| 1 | #ifndef LINUX_USER_TARGET_MMAN_H |
| 2 | #define LINUX_USER_TARGET_MMAN_H |
| 3 | |
| 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 |
| 8 | |
| 9 | /* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */ |
| 10 | #ifndef TARGET_MAP_GROWSDOWN |
| 11 | #define TARGET_MAP_GROWSDOWN 0x0100 |
| 12 | #endif |
| 13 | #ifndef TARGET_MAP_DENYWRITE |
| 14 | #define TARGET_MAP_DENYWRITE 0x0800 |
| 15 | #endif |
| 16 | #ifndef TARGET_MAP_EXECUTABLE |
| 17 | #define TARGET_MAP_EXECUTABLE 0x1000 |
| 18 | #endif |
| 19 | #ifndef TARGET_MAP_LOCKED |
| 20 | #define TARGET_MAP_LOCKED 0x2000 |
| 21 | #endif |
| 22 | #ifndef TARGET_MAP_NORESERVE |
| 23 | #define TARGET_MAP_NORESERVE 0x4000 |
| 24 | #endif |
| 25 | |
| 26 | /* Defined in asm-generic/mman-common.h */ |
| 27 | #ifndef TARGET_PROT_SEM |
| 28 | #define TARGET_PROT_SEM 0x08 |
| 29 | #endif |
| 30 | |
| 31 | #ifndef TARGET_MAP_TYPE |
| 32 | #define TARGET_MAP_TYPE 0x0f |
| 33 | #endif |
| 34 | #ifndef TARGET_MAP_FIXED |
| 35 | #define TARGET_MAP_FIXED 0x10 |
| 36 | #endif |
| 37 | #ifndef TARGET_MAP_ANONYMOUS |
| 38 | #define TARGET_MAP_ANONYMOUS 0x20 |
| 39 | #endif |
| 40 | #ifndef TARGET_MAP_POPULATE |
| 41 | #define TARGET_MAP_POPULATE 0x008000 |
| 42 | #endif |
| 43 | #ifndef TARGET_MAP_NONBLOCK |
| 44 | #define TARGET_MAP_NONBLOCK 0x010000 |
| 45 | #endif |
| 46 | #ifndef TARGET_MAP_STACK |
| 47 | #define TARGET_MAP_STACK 0x020000 |
| 48 | #endif |
| 49 | #ifndef TARGET_MAP_HUGETLB |
| 50 | #define TARGET_MAP_HUGETLB 0x040000 |
| 51 | #endif |
| 52 | #ifndef TARGET_MAP_SYNC |
| 53 | #define TARGET_MAP_SYNC 0x080000 |
| 54 | #endif |
| 55 | #ifndef TARGET_MAP_FIXED_NOREPLACE |
| 56 | #define TARGET_MAP_FIXED_NOREPLACE 0x100000 |
| 57 | #endif |
| 58 | #ifndef TARGET_MAP_UNINITIALIZED |
| 59 | #define TARGET_MAP_UNINITIALIZED 0x4000000 |
| 60 | #endif |
| 61 | |
| 62 | #ifndef TARGET_MADV_NORMAL |
| 63 | #define TARGET_MADV_NORMAL 0 |
| 64 | #endif |
| 65 | |
| 66 | #ifndef TARGET_MADV_RANDOM |
| 67 | #define TARGET_MADV_RANDOM 1 |
| 68 | #endif |
| 69 | |
| 70 | #ifndef TARGET_MADV_SEQUENTIAL |
| 71 | #define TARGET_MADV_SEQUENTIAL 2 |
| 72 | #endif |
| 73 | |
| 74 | #ifndef TARGET_MADV_WILLNEED |
| 75 | #define TARGET_MADV_WILLNEED 3 |
| 76 | #endif |
| 77 | |
| 78 | #ifndef TARGET_MADV_DONTNEED |
| 79 | #define TARGET_MADV_DONTNEED 4 |
| 80 | #endif |
| 81 | |
| 82 | #ifndef TARGET_MADV_FREE |
| 83 | #define TARGET_MADV_FREE 8 |
| 84 | #endif |
| 85 | |
| 86 | #ifndef TARGET_MADV_REMOVE |
| 87 | #define TARGET_MADV_REMOVE 9 |
| 88 | #endif |
| 89 | |
| 90 | #ifndef TARGET_MADV_DONTFORK |
| 91 | #define TARGET_MADV_DONTFORK 10 |
| 92 | #endif |
| 93 | |
| 94 | #ifndef TARGET_MADV_DOFORK |
| 95 | #define TARGET_MADV_DOFORK 11 |
| 96 | #endif |
| 97 | |
| 98 | #ifndef TARGET_MADV_MERGEABLE |
| 99 | #define TARGET_MADV_MERGEABLE 12 |
| 100 | #endif |
| 101 | |
| 102 | #ifndef TARGET_MADV_UNMERGEABLE |
| 103 | #define TARGET_MADV_UNMERGEABLE 13 |
| 104 | #endif |
| 105 | |
| 106 | #ifndef TARGET_MADV_HUGEPAGE |
| 107 | #define TARGET_MADV_HUGEPAGE 14 |
| 108 | #endif |
| 109 | |
| 110 | #ifndef TARGET_MADV_NOHUGEPAGE |
| 111 | #define TARGET_MADV_NOHUGEPAGE 15 |
| 112 | #endif |
| 113 | |
| 114 | #ifndef TARGET_MADV_DONTDUMP |
| 115 | #define TARGET_MADV_DONTDUMP 16 |
| 116 | #endif |
| 117 | |
| 118 | #ifndef TARGET_MADV_DODUMP |
| 119 | #define TARGET_MADV_DODUMP 17 |
| 120 | #endif |
| 121 | |
| 122 | #ifndef TARGET_MADV_WIPEONFORK |
| 123 | #define TARGET_MADV_WIPEONFORK 18 |
| 124 | #endif |
| 125 | |
| 126 | #ifndef TARGET_MADV_KEEPONFORK |
| 127 | #define TARGET_MADV_KEEPONFORK 19 |
| 128 | #endif |
| 129 | |
| 130 | #ifndef TARGET_MADV_COLD |
| 131 | #define TARGET_MADV_COLD 20 |
| 132 | #endif |
| 133 | |
| 134 | #ifndef TARGET_MADV_PAGEOUT |
| 135 | #define TARGET_MADV_PAGEOUT 21 |
| 136 | #endif |
| 137 | |
| 138 | #ifndef TARGET_MADV_POPULATE_READ |
| 139 | #define TARGET_MADV_POPULATE_READ 22 |
| 140 | #endif |
| 141 | |
| 142 | #ifndef TARGET_MADV_POPULATE_WRITE |
| 143 | #define TARGET_MADV_POPULATE_WRITE 23 |
| 144 | #endif |
| 145 | |
| 146 | #ifndef TARGET_MADV_DONTNEED_LOCKED |
| 147 | #define TARGET_MADV_DONTNEED_LOCKED 24 |
| 148 | #endif |
| 149 | |
| 150 | |
| 151 | #ifndef TARGET_MS_ASYNC |
| 152 | #define TARGET_MS_ASYNC 1 |
| 153 | #endif |
| 154 | |
| 155 | #ifndef TARGET_MS_INVALIDATE |
| 156 | #define TARGET_MS_INVALIDATE 2 |
| 157 | #endif |
| 158 | |
| 159 | #ifndef TARGET_MS_SYNC |
| 160 | #define TARGET_MS_SYNC 4 |
| 161 | #endif |
| 162 | |
| 163 | #endif |