#include <stdlib.h>
Go to the source code of this file.
◆ EXPAND
Value:
Definition at line 16 of file core.h.
◆ FORCE_INLINE
#define FORCE_INLINE inline __attribute__((always_inline)) |
◆ IN
Value:
Definition at line 13 of file core.h.
◆ INOUT
Value:
Definition at line 14 of file core.h.
◆ LIKELY
Value:__builtin_expect(!!(x), 1)
Definition at line 7 of file core.h.
◆ MAYBE_NULL
Value:
Definition at line 9 of file core.h.
◆ NAME
#define NAME |
( |
| pre, |
|
|
| post ) |
Value:
#define NAME_EXPANDED(pre, post)
Definition at line 5 of file core.h.
◆ NAME_EXPANDED
#define NAME_EXPANDED |
( |
| pre, |
|
|
| post ) |
Value:
Definition at line 4 of file core.h.
◆ NEVER_NULL
Value:
Definition at line 10 of file core.h.
◆ OUT
Value:
Definition at line 12 of file core.h.
◆ next_power_of_2()
static size_t next_power_of_2 |
( |
size_t | x | ) |
|
|
inlinestatic |
Definition at line 24 of file core.h.
24 {
25 if (x == 0)
26 return 1;
27 x--;
28 x |= x >> 1;
29 x |= x >> 2;
30 x |= x >> 4;
31 x |= x >> 8;
32 x |= x >> 16;
33#if SIZE_MAX > 0xFFFFFFFF
34 x |= x >> 32;
35#endif
36 return x + 1;
37}