aboutsummaryrefslogtreecommitdiff
path: root/kernel/include/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/common.h')
-rw-r--r--kernel/include/common.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/include/common.h b/kernel/include/common.h
index 2e1faa3..7f7f50f 100644
--- a/kernel/include/common.h
+++ b/kernel/include/common.h
@@ -36,4 +36,17 @@
halt(); \
}
+#define ASSERT(condition) \
+ { \
+ if (!(condition)) { \
+ printk("ASSERTION FAILED", \
+ "[%s]:%lu IS RENDERED FALSE.", \
+ __func__, \
+ __LINE__); \
+ /* TODO: We should probably remove this exit() eventually */ \
+ exit(); \
+ halt(); \
+ } \
+ }
+
#endif