BAN: Add ASSERT_NOT_REACHED()

This commit is contained in:
Bananymous 2023-02-26 02:53:58 +02:00
parent 34f9912a1d
commit 9439582154
1 changed files with 1 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#if defined(__is_kernel) #if defined(__is_kernel)
#include <kernel/Panic.h> #include <kernel/Panic.h>
#define ASSERT(cond) do { if (!(cond)) Kernel::panic("ASSERT("#cond") failed"); } while(false) #define ASSERT(cond) do { if (!(cond)) Kernel::panic("ASSERT("#cond") failed"); } while(false)
#define ASSERT_NOT_REACHED() Kernel::panic("ASSERT_NOT_REACHED() failed")
#else #else
#error "NOT IMPLEMENTED" #error "NOT IMPLEMENTED"
#endif #endif