|
MOS Source Code
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
14#define MOS_LIB_ASSERT(cond) MOS_LIB_ASSERT_X(cond, "")
20#define MOS_LIB_ASSERT_X(cond, msg, ...) MOS_ASSERT_X(cond, "" msg, ##__VA_ARGS__)
21#define MOS_LIB_UNIMPLEMENTED(content) MOS_UNIMPLEMENTED(content)
22#define MOS_LIB_UNREACHABLE() MOS_UNREACHABLE()
26#include <mos/platform_syscall.h>
29#define MOS_LIB_ASSERT_X(cond, msg, ...) \
32 if (unlikely(!(cond))) \
33 fatal_abort("Assertion failed: '%s', " msg "\n", #cond, ##__VA_ARGS__); \
38#define MOS_LIB_UNIMPLEMENTED(content) fatal_abort("Unimplemented: %s", content)
39#define MOS_LIB_UNREACHABLE() fatal_abort("Unreachable code reached")
40#define mos_panic(fmt, ...) fatal_abort(fmt "\n", ##__VA_ARGS__)
41#define mos_warn(fmt, ...) fprintf(stderr, "WARN: " fmt "\n", ##__VA_ARGS__)