RTEMS
5.1
|
Generic. More...
Files | |
file | align.h |
file | gentypes.h |
file | align.h |
Macros for making values and addresses aligned. | |
Macros | |
#define | ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1)) |
#define | ALIGN_DOWN(s, a) ((s) & ~((a) - 1)) |
#define | ALIGN_UP(s, a) (((s) + ((a) - 1)) & ~((a) - 1)) |
Generic.
#define ALIGN_DOWN | ( | s, | |
a | |||
) | ((s) & ~((a) - 1)) |
Align to the nearest lower address.
s | Address or size to be aligned. |
a | Size of alignment, must be power of 2. |
#define ALIGN_UP | ( | addr, | |
align | |||
) | (((addr) + ((align) - 1)) & ~((align) - 1)) |
Align to the nearest higher address.
addr | Address or size to be aligned. |
align | Size of alignment, must be power of 2. |
#define ALIGN_UP | ( | s, | |
a | |||
) | (((s) + ((a) - 1)) & ~((a) - 1)) |
Align to the nearest higher address.
s | Address or size to be aligned. |
a | Size of alignment, must be power of 2. |