diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-04-25 09:18:07 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-04-25 09:18:07 -0400 |
commit | 9cdcb56636717ccb935dc66c5d56681eaa5941c1 (patch) | |
tree | 290ac168d09b892641fd2f2f023b88f212976587 /include/linux/mman.h | |
parent | 8e442735ae6e2e1c857fb0c746027da8d8e40a81 (diff) |
Sanitise linux/mman.h for userspace consumption
It only really needs to define a few constants and include <asm/mman.h>
when it's used by userspace. Move the rest within #ifdef __KERNEL__
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/linux/mman.h')
-rw-r--r-- | include/linux/mman.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/mman.h b/include/linux/mman.h index 18a5689ef748..4ad21c5863fd 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _LINUX_MMAN_H | 1 | #ifndef _LINUX_MMAN_H |
2 | #define _LINUX_MMAN_H | 2 | #define _LINUX_MMAN_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/mm.h> | ||
6 | |||
7 | #include <asm/atomic.h> | ||
8 | #include <asm/mman.h> | 4 | #include <asm/mman.h> |
9 | 5 | ||
10 | #define MREMAP_MAYMOVE 1 | 6 | #define MREMAP_MAYMOVE 1 |
@@ -13,6 +9,13 @@ | |||
13 | #define OVERCOMMIT_GUESS 0 | 9 | #define OVERCOMMIT_GUESS 0 |
14 | #define OVERCOMMIT_ALWAYS 1 | 10 | #define OVERCOMMIT_ALWAYS 1 |
15 | #define OVERCOMMIT_NEVER 2 | 11 | #define OVERCOMMIT_NEVER 2 |
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/mm.h> | ||
16 | |||
17 | #include <asm/atomic.h> | ||
18 | |||
16 | extern int sysctl_overcommit_memory; | 19 | extern int sysctl_overcommit_memory; |
17 | extern int sysctl_overcommit_ratio; | 20 | extern int sysctl_overcommit_ratio; |
18 | extern atomic_t vm_committed_space; | 21 | extern atomic_t vm_committed_space; |
@@ -63,5 +66,5 @@ calc_vm_flag_bits(unsigned long flags) | |||
63 | _calc_vm_trans(flags, MAP_EXECUTABLE, VM_EXECUTABLE) | | 66 | _calc_vm_trans(flags, MAP_EXECUTABLE, VM_EXECUTABLE) | |
64 | _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); | 67 | _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); |
65 | } | 68 | } |
66 | 69 | #endif /* __KERNEL__ */ | |
67 | #endif /* _LINUX_MMAN_H */ | 70 | #endif /* _LINUX_MMAN_H */ |