mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 07:19:20 +00:00
Revamped kernel panic functions with significant improvements
This commit is contained in:
@ -20,15 +20,18 @@
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#define assert(x) \
|
||||
do \
|
||||
{ \
|
||||
if (__builtin_expect(!!(!(x)), 0)) \
|
||||
{ \
|
||||
error("Assertion failed! [%s]", #x); \
|
||||
int3; \
|
||||
__builtin_unreachable(); \
|
||||
} \
|
||||
EXTERNC void __attribute__((noreturn)) DisplayAssertionFailed(const char *File, int Line,
|
||||
const char *Expression);
|
||||
|
||||
#define assert(x) \
|
||||
do \
|
||||
{ \
|
||||
if (__builtin_expect(!!(!(x)), 0)) \
|
||||
{ \
|
||||
error("Assertion failed! [%s]", #x); \
|
||||
DisplayAssertionFailed(__FILE__, __LINE__, #x); \
|
||||
__builtin_unreachable(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define assert_allow_continue(x) \
|
||||
|
Reference in New Issue
Block a user