util: Define ROUND_UP()
...not actually used, just for completeness, as ROUND_DOWN() is defined. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
2f4f29c5a7
commit
955fe812dc
1 changed files with 2 additions and 0 deletions
2
util.h
2
util.h
|
@ -26,6 +26,8 @@ void debug(const char *format, ...);
|
||||||
|
|
||||||
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
|
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
|
||||||
#define ROUND_DOWN(x, y) ((x) & ~((y) - 1))
|
#define ROUND_DOWN(x, y) ((x) & ~((y) - 1))
|
||||||
|
#define ROUND_UP(x, y) (((x) + (y) - 1) & ~((y) - 1))
|
||||||
|
|
||||||
|
|
||||||
#define SWAP(a, b) \
|
#define SWAP(a, b) \
|
||||||
do { \
|
do { \
|
||||||
|
|
Loading…
Reference in a new issue