Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linuxkpi/common/include/linux/kernel.h
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | #define BUG_ON(cond) do { \ | ||||
} \ | } \ | ||||
} while (0) | } while (0) | ||||
#define WARN_ON(cond) ({ \ | #define WARN_ON(cond) ({ \ | ||||
bool __ret = (cond); \ | bool __ret = (cond); \ | ||||
if (__ret) { \ | if (__ret) { \ | ||||
printf("WARNING %s failed at %s:%d\n", \ | printf("WARNING %s failed at %s:%d\n", \ | ||||
__stringify(cond), __FILE__, __LINE__); \ | __stringify(cond), __FILE__, __LINE__); \ | ||||
linux_dump_stack(); \ | |||||
} \ | } \ | ||||
unlikely(__ret); \ | unlikely(__ret); \ | ||||
}) | }) | ||||
#define WARN_ON_SMP(cond) WARN_ON(cond) | #define WARN_ON_SMP(cond) WARN_ON(cond) | ||||
#define WARN_ON_ONCE(cond) ({ \ | #define WARN_ON_ONCE(cond) ({ \ | ||||
static bool __warn_on_once; \ | static bool __warn_on_once; \ | ||||
bool __ret = (cond); \ | bool __ret = (cond); \ | ||||
if (__ret && !__warn_on_once) { \ | if (__ret && !__warn_on_once) { \ | ||||
__warn_on_once = 1; \ | __warn_on_once = 1; \ | ||||
printf("WARNING %s failed at %s:%d\n", \ | printf("WARNING %s failed at %s:%d\n", \ | ||||
__stringify(cond), __FILE__, __LINE__); \ | __stringify(cond), __FILE__, __LINE__); \ | ||||
linux_dump_stack(); \ | |||||
} \ | } \ | ||||
unlikely(__ret); \ | unlikely(__ret); \ | ||||
}) | }) | ||||
#define oops_in_progress SCHEDULER_STOPPED() | #define oops_in_progress SCHEDULER_STOPPED() | ||||
#undef ALIGN | #undef ALIGN | ||||
#define ALIGN(x, y) roundup2((x), (y)) | #define ALIGN(x, y) roundup2((x), (y)) | ||||
▲ Show 20 Lines • Show All 402 Lines • Show Last 20 Lines |