diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2006-02-15 18:17:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-15 18:32:22 -0500 |
commit | 5f6164f3092832e0d9b12eed52e09a76bf39c64a (patch) | |
tree | 507043c3eafa00ad7241f1102c860e486f8dc544 /include/asm-mips/mman.h | |
parent | 06fed33849c13af637c4d09e9ba27828fac9edd5 (diff) |
[PATCH] add asm-generic/mman.h
Make new MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK consistent across all
arches. The idea is to make it possible to use them portably even before
distros include them in libc headers.
Move common flags to asm-generic/mman.h
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-mips/mman.h')
-rw-r--r-- | include/asm-mips/mman.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h index 6d01e26830fa..046cf686bee7 100644 --- a/include/asm-mips/mman.h +++ b/include/asm-mips/mman.h | |||
@@ -60,17 +60,19 @@ | |||
60 | #define MCL_CURRENT 1 /* lock all current mappings */ | 60 | #define MCL_CURRENT 1 /* lock all current mappings */ |
61 | #define MCL_FUTURE 2 /* lock all future mappings */ | 61 | #define MCL_FUTURE 2 /* lock all future mappings */ |
62 | 62 | ||
63 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | 63 | #define MADV_NORMAL 0 /* no further special treatment */ |
64 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | 64 | #define MADV_RANDOM 1 /* expect random page references */ |
65 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | 65 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ |
66 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | 66 | #define MADV_WILLNEED 3 /* will need these pages */ |
67 | #define MADV_DONTNEED 0x4 /* discard these pages */ | 67 | #define MADV_DONTNEED 4 /* don't need these pages */ |
68 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | 68 | |
69 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | 69 | /* common parameters: try to keep these consistent across architectures */ |
70 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | 70 | #define MADV_REMOVE 9 /* remove these pages & resources */ |
71 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
72 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
71 | 73 | ||
72 | /* compatibility flags */ | 74 | /* compatibility flags */ |
73 | #define MAP_ANON MAP_ANONYMOUS | 75 | #define MAP_ANON MAP_ANONYMOUS |
74 | #define MAP_FILE 0 | 76 | #define MAP_FILE 0 |
75 | 77 | ||
76 | #endif /* _ASM_MMAN_H */ | 78 | #endif /* _ASM_MMAN_H */ |