diff options
Diffstat (limited to 'include/linux/mempolicy.h')
-rw-r--r-- | include/linux/mempolicy.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index b8b3da7a3315..389a06e8ee21 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -9,12 +9,13 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /* Policies */ | 11 | /* Policies */ |
12 | #define MPOL_DEFAULT 0 | 12 | enum { |
13 | #define MPOL_PREFERRED 1 | 13 | MPOL_DEFAULT, |
14 | #define MPOL_BIND 2 | 14 | MPOL_PREFERRED, |
15 | #define MPOL_INTERLEAVE 3 | 15 | MPOL_BIND, |
16 | 16 | MPOL_INTERLEAVE, | |
17 | #define MPOL_MAX MPOL_INTERLEAVE | 17 | MPOL_MAX, /* always last member of enum */ |
18 | }; | ||
18 | 19 | ||
19 | /* Flags for get_mem_policy */ | 20 | /* Flags for get_mem_policy */ |
20 | #define MPOL_F_NODE (1<<0) /* return next IL mode instead of node mask */ | 21 | #define MPOL_F_NODE (1<<0) /* return next IL mode instead of node mask */ |
@@ -64,7 +65,7 @@ struct mm_struct; | |||
64 | */ | 65 | */ |
65 | struct mempolicy { | 66 | struct mempolicy { |
66 | atomic_t refcnt; | 67 | atomic_t refcnt; |
67 | short policy; /* See MPOL_* above */ | 68 | unsigned short policy; /* See MPOL_* above */ |
68 | union { | 69 | union { |
69 | short preferred_node; /* preferred */ | 70 | short preferred_node; /* preferred */ |
70 | nodemask_t nodes; /* interleave/bind */ | 71 | nodemask_t nodes; /* interleave/bind */ |
@@ -134,7 +135,7 @@ struct shared_policy { | |||
134 | spinlock_t lock; | 135 | spinlock_t lock; |
135 | }; | 136 | }; |
136 | 137 | ||
137 | void mpol_shared_policy_init(struct shared_policy *info, int policy, | 138 | void mpol_shared_policy_init(struct shared_policy *info, unsigned short policy, |
138 | nodemask_t *nodes); | 139 | nodemask_t *nodes); |
139 | int mpol_set_shared_policy(struct shared_policy *info, | 140 | int mpol_set_shared_policy(struct shared_policy *info, |
140 | struct vm_area_struct *vma, | 141 | struct vm_area_struct *vma, |
@@ -202,7 +203,7 @@ static inline int mpol_set_shared_policy(struct shared_policy *info, | |||
202 | } | 203 | } |
203 | 204 | ||
204 | static inline void mpol_shared_policy_init(struct shared_policy *info, | 205 | static inline void mpol_shared_policy_init(struct shared_policy *info, |
205 | int policy, nodemask_t *nodes) | 206 | unsigned short policy, nodemask_t *nodes) |
206 | { | 207 | { |
207 | } | 208 | } |
208 | 209 | ||