1 #ifndef SYS_MMAN_H
2 #define SYS_MMAN_H
3 
4 #include <sys/types.h>
5 
6 #define PROT_NONE	0x1
7 #define PROT_READ	0x2
8 #define PROT_WRITE	0x4
9 
10 #define MAP_ANON			0x1
11 #define MAP_ANONYMOUS		MAP_ANON
12 #define MAP_FIXED			0x2
13 #define MAP_HASSEMAPHORE	0x4
14 #define MAP_INHERIT			0x8
15 #define MAP_NOCORE			0x10
16 #define MAP_NOSYNC			0x20
17 #define MAP_PREFAULT_READ	0x40
18 #define MAP_PRIVATE			0x80
19 #define MAP_SHARED			0x100
20 #define MAP_STACK			0x200
21 
22 #define MAP_FAILED			NULL
23 
24 #define MS_ASYNC			0x1
25 #define MS_SYNC				0x2
26 #define MS_INVALIDATE		0x3
27 
28 int posix_madvise(void *addr, size_t len, int advice);
29 void *mmap(void *addr, size_t len, int prot, int flags,
30 		int fildes, off_t off);
31 int munmap(void *addr, size_t len);
32 int msync(void *addr, size_t len, int flags);
33 int munlock(const void * addr, size_t len);
34 int mlock(const void *addr, size_t len);
35 
36 #endif /* SYS_MMAN_H */
37