4 #include <sys/featuretest.h>
6 #include <machine/ansi.h>
7 #include <minix/type.h>
10 typedef _BSD_SIZE_T_
size_t;
17 typedef __mode_t mode_t
;
18 #define mode_t __mode_t
22 typedef __off_t off_t
; /* file offset */
28 * Protections are chosen from these bits, or-ed together
30 #define PROT_NONE 0x00 /* no permissions */
31 #define PROT_READ 0x01 /* pages can be read */
32 #define PROT_WRITE 0x02 /* pages can be written */
33 #define PROT_EXEC 0x04 /* pages can be executed */
36 * Flags contain sharing type and options.
37 * Sharing types; choose one.
40 #define MAP_SHARED 0x0001 /* share changes */
42 #define MAP_PRIVATE 0x0002 /* changes are private */
47 #define MAP_ANON 0x0004 /* anonymous memory */
50 * Minix specific flags.
52 #define MAP_PREALLOC 0x0008 /* not on-demand */
53 #define MAP_CONTIG 0x0010 /* contiguous in physical memory */
54 #define MAP_LOWER16M 0x0020 /* physically below 16MB */
55 #define MAP_ALIGN64K 0x0040 /* physically aligned at 64kB */
56 #define MAP_LOWER1M 0x0080 /* physically below 16MB */
57 #define MAP_ALIGNMENT_64KB MAP_ALIGN64K
59 #define MAP_FIXED 0x0200 /* require mapping to happen at hint */
60 #define MAP_THIRDPARTY 0x0400 /* perform on behalf of any process */
61 #define MAP_UNINITIALIZED 0x0800 /* do not clear memory */
64 * Error indicator returned by mmap(2)
66 #define MAP_FAILED ((void *) -1) /* mmap() failed */
68 #include <sys/cdefs.h>
72 void * mmap(void *, size_t, int, int, int, off_t
);
73 int munmap(void *, size_t);
75 void * minix_mmap(void *, size_t, int, int, int, off_t
);
76 void * minix_mmap_for(endpoint_t
, void *, size_t, int, int, int, off_t
);
77 int minix_munmap(void *, size_t);
78 void * vm_remap(int d
, int s
, void *da
, void *sa
, size_t si
);
79 void * vm_remap_ro(int d
, int s
, void *da
, void *sa
, size_t si
);
80 int vm_unmap(int endpt
, void *addr
);
81 unsigned long vm_getphys(int endpt
, void *addr
);
82 u8_t
vm_getrefcount(int endpt
, void *addr
);
86 #endif /* !_SYS_MMAN_H_ */