aboutsummaryrefslogtreecommitdiff
path: root/libk/stdlib.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-03-17 15:20:53 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-03-17 15:20:53 +0200
commit67b5d6ea184c432b21b3f07649ec3ba150a1d350 (patch)
treee35257ab15d0c69e96671dd405a0db911d89c2e5 /libk/stdlib.h
parentMostly fix scheduler throwing page faults (diff)
downloadkernel.cpp-67b5d6ea184c432b21b3f07649ec3ba150a1d350.tar.xz
cpuid: show manufacturer and model
Diffstat (limited to 'libk/stdlib.h')
-rw-r--r--libk/stdlib.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libk/stdlib.h b/libk/stdlib.h
index 843cc14..0fd1ad8 100644
--- a/libk/stdlib.h
+++ b/libk/stdlib.h
@@ -62,3 +62,9 @@ void printk(const T& a, const Args&... x) {
}
extern "C" __attribute__((__noreturn__)) void abort();
+
+#define runtime_assert(x, msg) \
+ if (!x) { \
+ printk(__FILE__, ':', __LINE__, ' ', msg); \
+ abort(); \
+ }