17 lines
861 B
C
17 lines
861 B
C
#ifndef _KERNEL_LIBK_ASSERT_H
|
|
#define _KERNEL_LIBK_ASSERT_H
|
|
|
|
#include <sys/debug.h>
|
|
#include <sys/spin.h>
|
|
|
|
#define assert(x) \
|
|
do { \
|
|
if (!(x)) { \
|
|
DEBUG("%s ssertion failed\n", #x); \
|
|
spin(); \
|
|
__builtin_unreachable(); \
|
|
} \
|
|
} while (0)
|
|
|
|
#endif // _KERNEL_LIBK_ASSERT_H
|