aboutsummaryrefslogtreecommitdiff
path: root/kernel/include/common.h
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-01-23 12:39:54 -0500
committerRaghuram Subramani <raghus2247@gmail.com>2025-01-23 12:48:07 -0500
commit943bbfd37779633bc89ff15de386b497a3e9c1ed (patch)
tree614acaf3f42661bf856dc52928c4a861d453268e /kernel/include/common.h
parentad75afac2bde43f13af5cbd3809638b155da929b (diff)
virtual_mm: Make progress on the still cursed
virtual_mm_find_free_virtual_addresses function
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