mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
compiler: add ALIGN_DOWN macro
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
This commit is contained in:
committed by
Andrei Vagin
parent
d553fad2dc
commit
c98fefdf5d
@@ -89,6 +89,7 @@
|
|||||||
#define round_down(x, y) ((x) & ~__round_mask(x, y))
|
#define round_down(x, y) ((x) & ~__round_mask(x, y))
|
||||||
#define DIV_ROUND_UP(n, d) (((n) + (d)-1) / (d))
|
#define DIV_ROUND_UP(n, d) (((n) + (d)-1) / (d))
|
||||||
#define ALIGN(x, a) (((x) + (a)-1) & ~((a)-1))
|
#define ALIGN(x, a) (((x) + (a)-1) & ~((a)-1))
|
||||||
|
#define ALIGN_DOWN(x, a) ALIGN((x) - ((a) - 1), (a))
|
||||||
|
|
||||||
#define min(x, y) \
|
#define min(x, y) \
|
||||||
({ \
|
({ \
|
||||||
|
Reference in New Issue
Block a user