[Glibc-bsd-commits] r3970 - trunk/glibc-ports/kfreebsd/sys
Robert Millan
rmh at alioth.debian.org
Sun Jan 8 16:13:03 UTC 2012
Author: rmh
Date: 2012-01-08 16:13:03 +0000 (Sun, 08 Jan 2012)
New Revision: 3970
Modified:
trunk/glibc-ports/kfreebsd/sys/param.h
Log:
Add roundup2() macro (used by <sys/pcpu.h>)
Modified: trunk/glibc-ports/kfreebsd/sys/param.h
===================================================================
--- trunk/glibc-ports/kfreebsd/sys/param.h 2012-01-08 15:22:28 UTC (rev 3969)
+++ trunk/glibc-ports/kfreebsd/sys/param.h 2012-01-08 16:13:03 UTC (rev 3970)
@@ -94,6 +94,7 @@
#else
# define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
#endif
+#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
#define powerof2(x) ((((x) - 1) & (x)) == 0)
/* Macros for min/max. */
More information about the Glibc-bsd-commits
mailing list