Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/systm.h
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | |||||
#ifndef CTASSERT /* Allow lint to override */ | #ifndef CTASSERT /* Allow lint to override */ | ||||
#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed") | #define CTASSERT(x) _Static_assert(x, "compile-time assertion failed") | ||||
#endif | #endif | ||||
#if defined(_KERNEL) | #if defined(_KERNEL) | ||||
#include <sys/param.h> /* MAXCPU */ | #include <sys/param.h> /* MAXCPU */ | ||||
#include <sys/pcpu.h> /* curthread */ | #include <sys/pcpu.h> /* curthread */ | ||||
#include <sys/kpilite.h> | #include <sys/kpilite.h> | ||||
#endif | |||||
/* | /* | ||||
* Helpful macros for quickly coming up with assertions with informative | * Helpful macros for quickly coming up with assertions with informative | ||||
* panic messages. | * panic messages. | ||||
*/ | */ | ||||
#define MPASS(ex) MPASS4(ex, #ex, __FILE__, __LINE__) | #define MPASS(ex) MPASS4(ex, #ex, __FILE__, __LINE__) | ||||
#define MPASS2(ex, what) MPASS4(ex, what, __FILE__, __LINE__) | #define MPASS2(ex, what) MPASS4(ex, what, __FILE__, __LINE__) | ||||
#define MPASS3(ex, file, line) MPASS4(ex, #ex, file, line) | #define MPASS3(ex, file, line) MPASS4(ex, #ex, file, line) | ||||
▲ Show 20 Lines • Show All 476 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
#define __gone_ok(m, msg) | #define __gone_ok(m, msg) | ||||
#endif | #endif | ||||
#define gone_in(major, msg) __gone_ok(major, msg) _gone_in(major, msg) | #define gone_in(major, msg) __gone_ok(major, msg) _gone_in(major, msg) | ||||
#define gone_in_dev(dev, major, msg) __gone_ok(major, msg) _gone_in_dev(dev, major, msg) | #define gone_in_dev(dev, major, msg) __gone_ok(major, msg) _gone_in_dev(dev, major, msg) | ||||
__NULLABILITY_PRAGMA_POP | __NULLABILITY_PRAGMA_POP | ||||
#endif | |||||
#endif /* !_SYS_SYSTM_H_ */ | #endif /* !_SYS_SYSTM_H_ */ |