]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/param.h
xnu-3248.60.10.tar.gz
[apple/xnu.git] / bsd / sys / param.h
index 93f92615081e0f7ebf29933acbefb0d8926eb610..012e7563095c58324ad5d19b158fb4e5e0352878 100644 (file)
 #define NeXTBSD4_0 0           /* NeXTBSD 4.0 */
 
 #include <sys/_types.h>
-
-#ifndef NULL
-#define        NULL    __DARWIN_NULL
-#endif /* ! NULL */
+#include <sys/_types/_null.h>
 
 #ifndef LOCORE
 #include <sys/types.h>
  * primarily determines the size of buffers in the buffer pool.  It may be
  * made larger than MAXPHYS without any effect on existing file systems;
  * however making it smaller may make some file systems unmountable.
- * We set this to track the value of (MAX_UPL_TRANSFER*PAGE_SIZE) from
+ * We set this to track the value of MAX_UPL_TRANSFER_BYTES from
  * osfmk/mach/memory_object_types.h to bound it at the maximum UPL size.
  */
 #define        MAXBSIZE        (256 * 4096)
 #ifndef howmany
 #define        howmany(x, y)   ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1))
 #endif
-#define        roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
+#define        roundup(x, y)   ((((x) % (y)) == 0) ? \
+                       (x) : ((x) + ((y) - ((x) % (y)))))
 #define powerof2(x)    ((((x)-1)&(x))==0)
 
 /* Macros for min/max. */