projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0dfe9a
)
tools/libxl: Introduce ROUNDUP()
author
Andrew Cooper
<andrew.cooper3@citrix.com>
Sat, 6 Jun 2015 14:46:54 +0000
(15:46 +0100)
committer
Ian Jackson
<Ian.Jackson@eu.citrix.com>
Wed, 15 Jul 2015 10:22:53 +0000
(11:22 +0100)
This is the same as is used by libxc.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_internal.h
patch
|
blob
|
history
diff --git
a/tools/libxl/libxl_internal.h
b/tools/libxl/libxl_internal.h
index 5235d2593d2dcbf9c96781487e295864d6e15c50..19fc4256683c19eb15194a2235c2cf8bb1fe6b38 100644
(file)
--- a/
tools/libxl/libxl_internal.h
+++ b/
tools/libxl/libxl_internal.h
@@
-110,6
+110,9
@@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+#define ROUNDUP(_val, _order) \
+ (((unsigned long)(_val)+(1UL<<(_order))-1) & ~((1UL<<(_order))-1))
+
#define min(X, Y) ({ \
const typeof (X) _x = (X); \
const typeof (Y) _y = (Y); \