This is the same as is used by libxc. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> CC: Ian Campbell <ian.campb...@citrix.com> CC: Ian Jackson <ian.jack...@eu.citrix.com> CC: Wei Liu <wei.l...@citrix.com> --- tools/libxl/libxl_internal.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 796bd21..a4636ca 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -109,6 +109,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); \ -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel