projects
/
rpikern
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cleanup
[rpikern]
/
src
/
libc
/
assert.h
diff --git a/src/libc/assert.h
b/src/libc/assert.h
new file mode 100644
(file)
index 0000000..
4ac0d15
--- /dev/null
+++ b/
src/libc/assert.h
@@ -0,0
+1,11
@@
+#ifndef ASSERT_H_
+#define ASSERT_H_
+
+#include "panic.h"
+
+#define assert(x) \
+ if(!(x)) { \
+ panic("Kernel assertion failed at " __FILE__ ":%d: " #x "\n", __LINE__); \
+ }
+
+#endif /* ASSERT_H_ */