Go to the source code of this file.
◆ ALIGN_DOWN
#define ALIGN_DOWN |
( |
|
x, |
|
|
|
a |
|
) |
| ((x) & ~((typeof(x))(a) - 1)) |
◆ ALIGN_MASK
#define ALIGN_MASK |
( |
|
x, |
|
|
|
mask |
|
) |
| |
Value:({ \
((x) + _mask) & ~_mask; \
})
Definition at line 13 of file align.h.
◆ ALIGN_UP
#define ALIGN_UP |
( |
|
x, |
|
|
|
a |
|
) |
| ALIGN_MASK(x, (typeof(x))(a) - 1) |
◆ IS_ALIGNED
#define IS_ALIGNED |
( |
|
x, |
|
|
|
a |
|
) |
| (((x) & ((typeof(x))(a) - 1)) == 0) |
◆ IS_PWR_OF_2
Value:({ \
typeof(x) _x = (x); \
_x == 0 || (_x & (_x - 1)) == 0; \
})
Definition at line 24 of file align.h.