aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-01-13 00:24:34 -0500
committerIan Moffett <ian@osmora.org>2024-01-13 00:24:34 -0500
commit70c2523065091f23c95830d428f3334b3e60aeb2 (patch)
tree1550c6fe79534582a8f4981498657aa9e7583f7e /sys
parentfc45b3117028a310ff9f98a011641bb54cffca78 (diff)
kernel: assert: Be more verbose
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r--sys/include/lib/assert.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/include/lib/assert.h b/sys/include/lib/assert.h
index 1ecc0f4..78ebe05 100644
--- a/sys/include/lib/assert.h
+++ b/sys/include/lib/assert.h
@@ -33,9 +33,10 @@
#include <sys/panic.h>
#include <sys/types.h>
-#define __assert(condition) \
- if ((uintptr_t)(condition) == 0) { \
- panic("Assert \"%s\" failed\n", #condition); \
+#define __assert(condition) \
+ if ((uintptr_t)(condition) == 0) { \
+ panic("Assert \"%s\" failed (%s() at %s:%d)\n", #condition, \
+ __func__, __FILE__, __LINE__); \
}
#endif /* !_LIB_ASSERT_H_ */