1 #ifndef LINUX_USER_TARGET_MMAN_H
2 #define LINUX_USER_TARGET_MMAN_H
4 /* These are defined in linux/mmap.h */
5 #define TARGET_MAP_SHARED 0x01
6 #define TARGET_MAP_PRIVATE 0x02
7 #define TARGET_MAP_SHARED_VALIDATE 0x03
9 /* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */
10 #ifndef TARGET_MAP_GROWSDOWN
11 #define TARGET_MAP_GROWSDOWN 0x0100
13 #ifndef TARGET_MAP_DENYWRITE
14 #define TARGET_MAP_DENYWRITE 0x0800
16 #ifndef TARGET_MAP_EXECUTABLE
17 #define TARGET_MAP_EXECUTABLE 0x1000
19 #ifndef TARGET_MAP_LOCKED
20 #define TARGET_MAP_LOCKED 0x2000
22 #ifndef TARGET_MAP_NORESERVE
23 #define TARGET_MAP_NORESERVE 0x4000
26 /* Defined in asm-generic/mman-common.h */
27 #ifndef TARGET_PROT_SEM
28 #define TARGET_PROT_SEM 0x08
31 #ifndef TARGET_MAP_TYPE
32 #define TARGET_MAP_TYPE 0x0f
34 #ifndef TARGET_MAP_FIXED
35 #define TARGET_MAP_FIXED 0x10
37 #ifndef TARGET_MAP_ANONYMOUS
38 #define TARGET_MAP_ANONYMOUS 0x20
40 #ifndef TARGET_MAP_POPULATE
41 #define TARGET_MAP_POPULATE 0x008000
43 #ifndef TARGET_MAP_NONBLOCK
44 #define TARGET_MAP_NONBLOCK 0x010000
46 #ifndef TARGET_MAP_STACK
47 #define TARGET_MAP_STACK 0x020000
49 #ifndef TARGET_MAP_HUGETLB
50 #define TARGET_MAP_HUGETLB 0x040000
52 #ifndef TARGET_MAP_SYNC
53 #define TARGET_MAP_SYNC 0x080000
55 #ifndef TARGET_MAP_FIXED_NOREPLACE
56 #define TARGET_MAP_FIXED_NOREPLACE 0x100000
58 #ifndef TARGET_MAP_UNINITIALIZED
59 #define TARGET_MAP_UNINITIALIZED 0x4000000
62 #ifndef TARGET_MADV_NORMAL
63 #define TARGET_MADV_NORMAL 0
66 #ifndef TARGET_MADV_RANDOM
67 #define TARGET_MADV_RANDOM 1
70 #ifndef TARGET_MADV_SEQUENTIAL
71 #define TARGET_MADV_SEQUENTIAL 2
74 #ifndef TARGET_MADV_WILLNEED
75 #define TARGET_MADV_WILLNEED 3
78 #ifndef TARGET_MADV_DONTNEED
79 #define TARGET_MADV_DONTNEED 4
82 #ifndef TARGET_MADV_FREE
83 #define TARGET_MADV_FREE 8
86 #ifndef TARGET_MADV_REMOVE
87 #define TARGET_MADV_REMOVE 9
90 #ifndef TARGET_MADV_DONTFORK
91 #define TARGET_MADV_DONTFORK 10
94 #ifndef TARGET_MADV_DOFORK
95 #define TARGET_MADV_DOFORK 11
98 #ifndef TARGET_MADV_MERGEABLE
99 #define TARGET_MADV_MERGEABLE 12
102 #ifndef TARGET_MADV_UNMERGEABLE
103 #define TARGET_MADV_UNMERGEABLE 13
106 #ifndef TARGET_MADV_HUGEPAGE
107 #define TARGET_MADV_HUGEPAGE 14
110 #ifndef TARGET_MADV_NOHUGEPAGE
111 #define TARGET_MADV_NOHUGEPAGE 15
114 #ifndef TARGET_MADV_DONTDUMP
115 #define TARGET_MADV_DONTDUMP 16
118 #ifndef TARGET_MADV_DODUMP
119 #define TARGET_MADV_DODUMP 17
122 #ifndef TARGET_MADV_WIPEONFORK
123 #define TARGET_MADV_WIPEONFORK 18
126 #ifndef TARGET_MADV_KEEPONFORK
127 #define TARGET_MADV_KEEPONFORK 19
130 #ifndef TARGET_MADV_COLD
131 #define TARGET_MADV_COLD 20
134 #ifndef TARGET_MADV_PAGEOUT
135 #define TARGET_MADV_PAGEOUT 21
138 #ifndef TARGET_MADV_POPULATE_READ
139 #define TARGET_MADV_POPULATE_READ 22
142 #ifndef TARGET_MADV_POPULATE_WRITE
143 #define TARGET_MADV_POPULATE_WRITE 23
146 #ifndef TARGET_MADV_DONTNEED_LOCKED
147 #define TARGET_MADV_DONTNEED_LOCKED 24
151 #ifndef TARGET_MS_ASYNC
152 #define TARGET_MS_ASYNC 1
155 #ifndef TARGET_MS_INVALIDATE
156 #define TARGET_MS_INVALIDATE 2
159 #ifndef TARGET_MS_SYNC
160 #define TARGET_MS_SYNC 4