Go to the source code of this file.
|
| #define | BUILD_BUG_ON_ZERO(e, ...) __BUILD_BUG_ON_ZERO_MSG(e, ##__VA_ARGS__, #e " is true") |
| |
| #define | __BUILD_BUG_ON_NOT_POWER_OF_2(n) BUILD_BUG_ON(((n) & ((n) - 1)) != 0) |
| |
| #define | BUILD_BUG_ON_NOT_POWER_OF_2(n) BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) |
| |
| #define | BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e)))) |
| |
| #define | BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) |
| |
| #define | BUILD_BUG_ON(condition) BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) |
| |
| #define | BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") |
| |
| #define | static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) |
| |
| #define | __static_assert(expr, msg, ...) _Static_assert(expr, msg) |
| |
| #define | ASSERT_STRUCT_OFFSET(type, field, expected_offset) |
| |
◆ __BUILD_BUG_ON_NOT_POWER_OF_2
| #define __BUILD_BUG_ON_NOT_POWER_OF_2 |
( |
|
n | ) |
BUILD_BUG_ON(((n) & ((n) - 1)) != 0) |
◆ __static_assert
| #define __static_assert |
( |
|
expr, |
|
|
|
msg, |
|
|
|
... |
|
) |
| _Static_assert(expr, msg) |
◆ ASSERT_STRUCT_OFFSET
| #define ASSERT_STRUCT_OFFSET |
( |
|
type, |
|
|
|
field, |
|
|
|
expected_offset |
|
) |
| |
Value:
"Offset of " #field " in " #type " has changed.")
#define BUILD_BUG_ON_MSG(cond, msg)
#define offsetof(type, member)
Definition kernel.h:177
◆ BUILD_BUG
◆ BUILD_BUG_ON
| #define BUILD_BUG_ON |
( |
|
condition | ) |
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) |
◆ BUILD_BUG_ON_INVALID
| #define BUILD_BUG_ON_INVALID |
( |
|
e | ) |
((void)(sizeof((__force long)(e)))) |
◆ BUILD_BUG_ON_MSG
◆ BUILD_BUG_ON_NOT_POWER_OF_2
| #define BUILD_BUG_ON_NOT_POWER_OF_2 |
( |
|
n | ) |
BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) |
◆ BUILD_BUG_ON_ZERO
◆ static_assert
| #define static_assert |
( |
|
expr, |
|
|
|
... |
|
) |
| __static_assert(expr, ##__VA_ARGS__, #expr) |