/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
#ifndef _SYS_MMAN_H_
#define _SYS_MMAN_H_
+#include <sys/appleapiopts.h>
#include <mach/shared_memory_server.h>
/*
#define MAP_FIXED 0x0010 /* map addr must be exactly as requested */
#define MAP_RENAME 0x0020 /* Sun: rename private pages to file */
#define MAP_NORESERVE 0x0040 /* Sun: don't reserve needed swap area */
-#define MAP_INHERIT 0x0080 /* region is retained after exec */
+#define MAP_RESERVED0080 0x0080 /* previously unimplemented MAP_INHERIT */
#define MAP_NOEXTEND 0x0100 /* for MAP_FILE, don't change file size */
#define MAP_HASSEMAPHORE 0x0200 /* region may contain semaphores */
#define MADV_WILLNEED 3 /* will need these pages */
#define MADV_DONTNEED 4 /* dont need these pages */
#define MADV_FREE 5 /* dont need these pages, and junk contents */
+#define POSIX_MADV_NORMAL MADV_NORMAL
+#define POSIX_MADV_RANDOM MADV_RANDOM
+#define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
+#define POSIX_MADV_WILLNEED MADV_WILLNEED
+#define POSIX_MADV_DONTNEED MADV_DONTNEED
/*
* Return bits from mincore
int munmap __P((void *, size_t));
int shm_open __P((const char *, int, ...));
int shm_unlink __P((const char *));
+int posix_madvise __P((void *, size_t, int));
#ifndef _POSIX_SOURCE
-int load_shared_file __P((char *, caddr_t, u_long, caddr_t *, int, sf_mapping_t *, int *));
+#ifdef __APPLE_API_PRIVATE
+int load_shared_file __P((char *, caddr_t, u_long,
+ caddr_t *, int, sf_mapping_t *, int *));
int reset_shared_file __P((caddr_t *, int, sf_mapping_t *));
+int new_system_shared_regions __P((void));
+#endif /* __APPLE_API_PRIVATE */
int madvise __P((void *, size_t, int));
int mincore __P((const void *, size_t, char *));
int minherit __P((void *, size_t, int));