diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/cpuset.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index eeaaee746bee..a73454aec333 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
| @@ -21,6 +21,7 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */ | |||
| 21 | extern int cpuset_init(void); | 21 | extern int cpuset_init(void); |
| 22 | extern void cpuset_init_smp(void); | 22 | extern void cpuset_init_smp(void); |
| 23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); | 23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); |
| 24 | extern int cpuset_cpus_allowed_fallback(struct task_struct *p); | ||
| 24 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | 25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); |
| 25 | #define cpuset_current_mems_allowed (current->mems_allowed) | 26 | #define cpuset_current_mems_allowed (current->mems_allowed) |
| 26 | void cpuset_init_current_mems_allowed(void); | 27 | void cpuset_init_current_mems_allowed(void); |
| @@ -101,6 +102,12 @@ static inline void cpuset_cpus_allowed(struct task_struct *p, | |||
| 101 | cpumask_copy(mask, cpu_possible_mask); | 102 | cpumask_copy(mask, cpu_possible_mask); |
| 102 | } | 103 | } |
| 103 | 104 | ||
| 105 | static inline int cpuset_cpus_allowed_fallback(struct task_struct *p) | ||
| 106 | { | ||
| 107 | cpumask_copy(&p->cpus_allowed, cpu_possible_mask); | ||
| 108 | return cpumask_any(cpu_active_mask); | ||
| 109 | } | ||
| 110 | |||
| 104 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | 111 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) |
| 105 | { | 112 | { |
| 106 | return node_possible_map; | 113 | return node_possible_map; |
