summaryrefslogtreecommitdiff
path: root/src/kernel/panic.h
diff options
context:
space:
mode:
authordzwdz2021-08-22 11:58:47 +0200
committerdzwdz2021-08-22 11:58:47 +0200
commit175b575bbdca5d620c1ace1281568b2bb9c6b021 (patch)
treec2a660ca76031acb07c3b9648022b781dddfeb50 /src/kernel/panic.h
parent5aaf1d48ec052d1582eae2c7642adc8829a6711b (diff)
kernel: implement assert
Diffstat (limited to 'src/kernel/panic.h')
-rw-r--r--src/kernel/panic.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kernel/panic.h b/src/kernel/panic.h
index 1e25a83..9407e44 100644
--- a/src/kernel/panic.h
+++ b/src/kernel/panic.h
@@ -8,3 +8,5 @@
tty_const(" (" __FILE__ ":" NUM2STR(__LINE__) ") "); \
halt_cpu(); \
} while (0)
+
+#define assert(stmt) do { if (!(stmt)) panic(); } while (0)