#define NeXTBSD 1995064 /* NeXTBSD version (year, month, release) */
#define NeXTBSD4_0 0 /* NeXTBSD 4.0 */
+#include <sys/_types.h>
+
#ifndef NULL
-#define NULL 0
-#endif
+#define NULL __DARWIN_NULL
+#endif /* ! NULL */
#ifndef LOCORE
#include <sys/types.h>
#define MAXCOMLEN 16 /* max command name remembered */
#define MAXINTERP 64 /* max interpreter file name length */
-#define MAXLOGNAME 12 /* max login name length */
+#define MAXLOGNAME 255 /* max login name length */
#define MAXUPRC CHILD_MAX /* max simultaneous processes */
#define NCARGS ARG_MAX /* max bytes for an exec function */
#define NGROUPS NGROUPS_MAX /* max number groups */
/* Machine type dependent parameters. */
#include <machine/param.h>
-#include <machine/limits.h>
/* More types and definitions used throughout the kernel. */
#ifdef KERNEL
+#include <machine/limits.h>
#include <sys/cdefs.h>
#include <sys/errno.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/ucred.h>
#include <sys/uio.h>
+#else
+#include <limits.h>
#endif
/* Signals. */
#define PRIMASK 0x0ff
#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */
#define PTTYBLOCK 0x200 /* for tty SIGTTOU and SIGTTIN blocking */
+#define PDROP 0x400 /* OR'd with pri to stop re-entry of interlock mutex */
#define NZERO 0 /* default "nice" */
/*
* File system parameters and macros.
*
- * The file system is made out of blocks of at most MAXBSIZE units, with
+ * The file system is made out of blocks of at most MAXPHYS units, with
* smaller units (fragments) only in the last direct block. MAXBSIZE
* primarily determines the size of buffers in the buffer pool. It may be
- * made larger without any effect on existing file systems; however making
- * it smaller make make some file systems unmountable.
+ * 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
+ * osfmk/mach/memory_object_types.h to bound it at the maximum UPL size.
*/
-#define MAXBSIZE MAXPHYS
+#define MAXBSIZE (256 * 4096)
#define MAXPHYSIO MAXPHYS
#define MAXFRAG 8
+#define MAXPHYSIO_WIRED (16 * 1024 * 1024)
+
/*
* MAXPATHLEN defines the longest permissable path length after expanding
* symbolic links. It is used to allocate a temporary buffer from the buffer