Index: kernel/generic/include/adt/list.h
===================================================================
--- kernel/generic/include/adt/list.h	(revision 83dab11c929c1a48613d4dc70ed8ca9113463484)
+++ kernel/generic/include/adt/list.h	(revision 63e27efdf2fe6d3fa02bbb5ee1da00df5cc07e9d)
@@ -37,5 +37,5 @@
 #define KERN_LIST_H_
 
-#include <debug.h>
+#include <assert.h>
 #include <stdbool.h>
 #include <stddef.h>
@@ -120,5 +120,5 @@
 	
 #define assert_link_not_used(link) \
-	ASSERT(!link_used(link))
+	assert(!link_used(link))
 
 /** Initialize doubly-linked circular list link
@@ -390,5 +390,5 @@
 		return false;
 
-	ASSERT(link->prev != NULL && link->next != NULL);
+	assert(link->prev != NULL && link->next != NULL);
 	return true;
 }
Index: kernel/generic/include/assert.h
===================================================================
--- kernel/generic/include/assert.h	(revision 63e27efdf2fe6d3fa02bbb5ee1da00df5cc07e9d)
+++ kernel/generic/include/assert.h	(revision 63e27efdf2fe6d3fa02bbb5ee1da00df5cc07e9d)
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2005 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup genericdebug
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_ASSERT_H_
+#define KERN_ASSERT_H_
+
+#include <panic.h>
+
+#ifdef CONFIG_DEBUG
+
+/** Debugging assert macro
+ *
+ * If CONFIG_DEBUG is set, the assert() macro
+ * evaluates expr and if it is false raises
+ * kernel panic.
+ *
+ * @param expr Expression which is expected to be true.
+ *
+ */
+#define assert(expr) \
+	do { \
+		if (!(expr)) \
+			panic_assert("%s() at %s:%u:\n%s", \
+			    __func__, __FILE__, __LINE__, #expr); \
+	} while (0)
+
+/** Debugging verbose assert macro
+ *
+ * If CONFIG_DEBUG is set, the assert_verbose() macro
+ * evaluates expr and if it is false raises
+ * kernel panic. The panic message contains also
+ * the supplied message.
+ *
+ * @param expr Expression which is expected to be true.
+ * @param msg  Additional message to show (string).
+ *
+ */
+#define assert_verbose(expr, msg) \
+	do { \
+		if (!(expr)) \
+			panic_assert("%s() at %s:%u:\n%s, %s", \
+			    __func__, __FILE__, __LINE__, #expr, msg); \
+	} while (0)
+
+/** Static assert macro
+ *
+ */
+#define static_assert \
+	_Static_assert
+
+#else /* CONFIG_DEBUG */
+
+#define assert(expr)
+#define assert_verbose(expr, msg)
+#define static_assert(expr, msg)
+
+#endif /* CONFIG_DEBUG */
+
+#endif
+
+/** @}
+ */
Index: kernel/generic/include/debug.h
===================================================================
--- kernel/generic/include/debug.h	(revision 83dab11c929c1a48613d4dc70ed8ca9113463484)
+++ kernel/generic/include/debug.h	(revision 63e27efdf2fe6d3fa02bbb5ee1da00df5cc07e9d)
@@ -36,64 +36,8 @@
 #define KERN_DEBUG_H_
 
-#include <panic.h>
 #include <log.h>
 #include <symtab_lookup.h>
 
 #define CALLER  ((uintptr_t) __builtin_return_address(0))
-
-#ifdef CONFIG_DEBUG
-
-/** Debugging ASSERT macro
- *
- * If CONFIG_DEBUG is set, the ASSERT() macro
- * evaluates expr and if it is false raises
- * kernel panic.
- *
- * @param expr Expression which is expected to be true.
- *
- */
-#define ASSERT(expr) \
-	do { \
-		if (!(expr)) \
-			panic_assert("%s() at %s:%u:\n%s", \
-			    __func__, __FILE__, __LINE__, #expr); \
-	} while (0)
-
-/** Debugging verbose ASSERT macro
- *
- * If CONFIG_DEBUG is set, the ASSERT() macro
- * evaluates expr and if it is false raises
- * kernel panic. The panic message contains also
- * the supplied message.
- *
- * @param expr Expression which is expected to be true.
- * @param msg  Additional message to show (string).
- *
- */
-#define ASSERT_VERBOSE(expr, msg) \
-	do { \
-		if (!(expr)) \
-			panic_assert("%s() at %s:%u:\n%s, %s", \
-			    __func__, __FILE__, __LINE__, #expr, msg); \
-	} while (0)
-
-/** Static assert macro
- *
- */
-#define STATIC_ASSERT(expr) \
-	_Static_assert(expr, "")
-
-#define STATIC_ASSERT_VERBOSE(expr, msg) \
-	_Static_assert(expr, msg)
-
-
-#else /* CONFIG_DEBUG */
-
-#define ASSERT(expr)
-#define ASSERT_VERBOSE(expr, msg)
-#define STATIC_ASSERT(expr)
-#define STATIC_ASSERT_VERBOSE(expr, msg)
-
-#endif /* CONFIG_DEBUG */
 
 #ifdef CONFIG_LOG
Index: kernel/generic/include/preemption.h
===================================================================
--- kernel/generic/include/preemption.h	(revision 83dab11c929c1a48613d4dc70ed8ca9113463484)
+++ kernel/generic/include/preemption.h	(revision 63e27efdf2fe6d3fa02bbb5ee1da00df5cc07e9d)
@@ -37,6 +37,6 @@
 
 #include <arch.h>
+#include <assert.h>
 #include <compiler/barrier.h>
-#include <debug.h>
 
 #define PREEMPTION_INC         (1 << 0)
@@ -54,5 +54,5 @@
 #define preemption_enable() \
 	do { \
-		ASSERT(PREEMPTION_DISABLED); \
+		assert(PREEMPTION_DISABLED); \
 		compiler_barrier(); \
 		THE->preemption -= PREEMPTION_INC; \
Index: kernel/generic/include/synch/rcu.h
===================================================================
--- kernel/generic/include/synch/rcu.h	(revision 83dab11c929c1a48613d4dc70ed8ca9113463484)
+++ kernel/generic/include/synch/rcu.h	(revision 63e27efdf2fe6d3fa02bbb5ee1da00df5cc07e9d)
@@ -36,4 +36,5 @@
 #define KERN_RCU_H_
 
+#include <assert.h>
 #include <synch/rcu_types.h>
 #include <compiler/barrier.h>
@@ -162,5 +163,5 @@
 static inline void _rcu_record_qs(void)
 {
-	ASSERT(PREEMPTION_DISABLED || interrupts_disabled());
+	assert(PREEMPTION_DISABLED || interrupts_disabled());
 	
 	/* 
@@ -207,5 +208,5 @@
 static inline void rcu_read_lock(void)
 {
-	ASSERT(CPU);
+	assert(CPU);
 	preemption_disable();
 
@@ -222,5 +223,5 @@
 static inline void rcu_read_unlock(void)
 {
-	ASSERT(CPU);
+	assert(CPU);
 	preemption_disable();
 	
Index: kernel/generic/include/synch/spinlock.h
===================================================================
--- kernel/generic/include/synch/spinlock.h	(revision 83dab11c929c1a48613d4dc70ed8ca9113463484)
+++ kernel/generic/include/synch/spinlock.h	(revision 63e27efdf2fe6d3fa02bbb5ee1da00df5cc07e9d)
@@ -38,7 +38,7 @@
 #include <stdbool.h>
 #include <arch/barrier.h>
+#include <assert.h>
 #include <preemption.h>
 #include <atomic.h>
-#include <debug.h>
 #include <arch/asm.h>
 
@@ -80,5 +80,5 @@
 
 #define ASSERT_SPINLOCK(expr, lock) \
-	ASSERT_VERBOSE(expr, (lock)->name)
+	assert_verbose(expr, (lock)->name)
 
 #define spinlock_lock(lock)    spinlock_lock_debug((lock))
@@ -98,5 +98,5 @@
 
 #define ASSERT_SPINLOCK(expr, lock) \
-	ASSERT(expr)
+	assert(expr)
 
 #define spinlock_lock(lock)    atomic_lock_arch(&(lock)->val)
@@ -175,5 +175,5 @@
 #define SPINLOCK_STATIC_INITIALIZE_NAME(name, desc_name)
 
-#define ASSERT_SPINLOCK(expr, lock)  ASSERT(expr)
+#define ASSERT_SPINLOCK(expr, lock)  assert(expr)
 
 #define spinlock_initialize(lock, name)
