Index: kernel/generic/src/ipc/event.c
===================================================================
--- kernel/generic/src/ipc/event.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
+++ kernel/generic/src/ipc/event.c	(revision 5cd1eb9a685b70d040e94a7023215fb9b2466ffd)
@@ -35,4 +35,5 @@
  */
 
+#include <assert.h>
 #include <ipc/event.h>
 #include <mm/slab.h>
@@ -59,5 +60,5 @@
 static event_t *evno2event(int evno, task_t *task)
 {
-	ASSERT(evno < EVENT_TASK_END);
+	assert(evno < EVENT_TASK_END);
 	
 	event_t *event;
@@ -123,5 +124,5 @@
 void event_set_unmask_callback(event_type_t evno, event_callback_t callback)
 {
-	ASSERT(evno < EVENT_END);
+	assert(evno < EVENT_END);
 	
 	_event_set_unmask_callback(evno2event(evno, NULL), callback);
@@ -131,6 +132,6 @@
     event_callback_t callback)
 {
-	ASSERT(evno >= (int) EVENT_END);
-	ASSERT(evno < EVENT_TASK_END);
+	assert(evno >= (int) EVENT_END);
+	assert(evno < EVENT_TASK_END);
 		
 	_event_set_unmask_callback(evno2event(evno, task), callback);
@@ -208,5 +209,5 @@
     sysarg_t a3, sysarg_t a4, sysarg_t a5)
 {
-	ASSERT(evno < EVENT_END);
+	assert(evno < EVENT_END);
 	
 	return event_enqueue(evno2event(evno, NULL), mask, a1, a2, a3, a4, a5);
@@ -236,6 +237,6 @@
     sysarg_t a1, sysarg_t a2, sysarg_t a3, sysarg_t a4, sysarg_t a5)
 {
-	ASSERT(evno >= (int) EVENT_END);
-	ASSERT(evno < EVENT_TASK_END);
+	assert(evno >= (int) EVENT_END);
+	assert(evno < EVENT_TASK_END);
 	
 	return event_enqueue(evno2event(evno, task), mask, a1, a2, a3, a4, a5);
Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
+++ kernel/generic/src/ipc/ipc.c	(revision 5cd1eb9a685b70d040e94a7023215fb9b2466ffd)
@@ -38,4 +38,5 @@
  */
 
+#include <assert.h>
 #include <synch/spinlock.h>
 #include <synch/mutex.h>
@@ -52,5 +53,4 @@
 #include <proc/task.h>
 #include <mem.h>
-#include <debug.h>
 #include <print.h>
 #include <console/console.h>
@@ -227,5 +227,5 @@
 		spinlock_lock(&TASK->active_calls_lock);
 
-		ASSERT(!request->forget);
+		assert(!request->forget);
 
 		bool answered = !request->active;
@@ -253,5 +253,5 @@
 		}
 	}
-	ASSERT(!answer || request == answer);
+	assert(!answer || request == answer);
 	
 	slab_free(ipc_answerbox_slab, mybox);
@@ -631,5 +631,5 @@
 		
 		/* Disconnect phone */
-		ASSERT(phone->state == IPC_PHONE_CONNECTED);
+		assert(phone->state == IPC_PHONE_CONNECTED);
 		
 		list_remove(&phone->link);
@@ -668,6 +668,6 @@
 static void ipc_forget_call(call_t *call)
 {
-	ASSERT(spinlock_locked(&TASK->active_calls_lock));
-	ASSERT(spinlock_locked(&call->forget_lock));
+	assert(spinlock_locked(&TASK->active_calls_lock));
+	assert(spinlock_locked(&call->forget_lock));
 
 	/*
@@ -789,5 +789,5 @@
 	call = ipc_wait_for_call(&TASK->answerbox, SYNCH_NO_TIMEOUT,
 	    SYNCH_FLAGS_NONE);
-	ASSERT(call->flags & (IPC_CALL_ANSWERED | IPC_CALL_NOTIF));
+	assert(call->flags & (IPC_CALL_ANSWERED | IPC_CALL_NOTIF));
 
 	SYSIPC_OP(answer_process, call);
Index: kernel/generic/src/ipc/ipcrsc.c
===================================================================
--- kernel/generic/src/ipc/ipcrsc.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
+++ kernel/generic/src/ipc/ipcrsc.c	(revision 5cd1eb9a685b70d040e94a7023215fb9b2466ffd)
@@ -131,5 +131,5 @@
 #include <proc/task.h>
 #include <ipc/ipcrsc.h>
-#include <debug.h>
+#include <assert.h>
 #include <abi/errno.h>
 
@@ -220,5 +220,5 @@
 static void phone_deallocp(phone_t *phone)
 {
-	ASSERT(phone->state == IPC_PHONE_CONNECTING);
+	assert(phone->state == IPC_PHONE_CONNECTING);
 	
 	/* Atomic operation */
@@ -253,5 +253,5 @@
 	phone_t *phone = &TASK->phones[phoneid];
 	
-	ASSERT(phone->state == IPC_PHONE_CONNECTING);
+	assert(phone->state == IPC_PHONE_CONNECTING);
 	return ipc_phone_connect(phone, box);
 }
Index: kernel/generic/src/ipc/irq.c
===================================================================
--- kernel/generic/src/ipc/irq.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
+++ kernel/generic/src/ipc/irq.c	(revision 5cd1eb9a685b70d040e94a7023215fb9b2466ffd)
@@ -72,4 +72,5 @@
 
 #include <arch.h>
+#include <assert.h>
 #include <mm/slab.h>
 #include <mm/page.h>
@@ -399,5 +400,5 @@
 	irq_spinlock_lock(&box->irq_lock, false);
 	
-	ASSERT(irq->notif_cfg.answerbox == box);
+	assert(irq->notif_cfg.answerbox == box);
 	
 	/* Remove the IRQ from the answerbox's list. */
@@ -463,5 +464,5 @@
 		key[1] = irq->devno;
 		
-		ASSERT(irq->notif_cfg.answerbox == box);
+		assert(irq->notif_cfg.answerbox == box);
 		
 		/* Unlist from the answerbox. */
@@ -607,8 +608,8 @@
 void ipc_irq_top_half_handler(irq_t *irq)
 {
-	ASSERT(irq);
-	
-	ASSERT(interrupts_disabled());
-	ASSERT(irq_spinlock_locked(&irq->lock));
+	assert(irq);
+	
+	assert(interrupts_disabled());
+	assert(irq_spinlock_locked(&irq->lock));
 	
 	if (irq->notif_cfg.answerbox) {
Index: kernel/generic/src/ipc/ops/dataread.c
===================================================================
--- kernel/generic/src/ipc/ops/dataread.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
+++ kernel/generic/src/ipc/ops/dataread.c	(revision 5cd1eb9a685b70d040e94a7023215fb9b2466ffd)
@@ -33,4 +33,5 @@
  */
 
+#include <assert.h>
 #include <ipc/sysipc_ops.h>
 #include <ipc/ipc.h>
@@ -58,5 +59,5 @@
 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)
 {
-	ASSERT(!answer->buffer);
+	assert(!answer->buffer);
 
 	if (!IPC_GET_RETVAL(answer->data)) {
Index: kernel/generic/src/ipc/ops/datawrite.c
===================================================================
--- kernel/generic/src/ipc/ops/datawrite.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
+++ kernel/generic/src/ipc/ops/datawrite.c	(revision 5cd1eb9a685b70d040e94a7023215fb9b2466ffd)
@@ -33,4 +33,5 @@
  */
 
+#include <assert.h>
 #include <ipc/sysipc_ops.h>
 #include <ipc/ipc.h>
@@ -70,5 +71,5 @@
 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)
 {
-	ASSERT(answer->buffer);
+	assert(answer->buffer);
 
 	if (!IPC_GET_RETVAL(answer->data)) {
Index: kernel/generic/src/ipc/sysipc.c
===================================================================
--- kernel/generic/src/ipc/sysipc.c	(revision 44a7ee5373ccc121fce74799244a44867eed301d)
+++ kernel/generic/src/ipc/sysipc.c	(revision 5cd1eb9a685b70d040e94a7023215fb9b2466ffd)
@@ -34,4 +34,5 @@
 
 #include <arch.h>
+#include <assert.h>
 #include <errno.h>
 #include <mem.h>
@@ -174,5 +175,5 @@
 		return rc;
 	} else {
-		ASSERT(answer->active);
+		assert(answer->active);
 
 		/*
@@ -313,5 +314,5 @@
 				 * We are no longer expected to free it.
 				 */
-				ASSERT(rc == EINTR);
+				assert(rc == EINTR);
 			}
 			return rc;	
