mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
cpuset: modify cpuset_set_cpus_allowed to use cpumask pointer
* Modify cpuset_cpus_allowed to return the currently allowed cpuset via a pointer argument instead of as the function return value. * Use new set_cpus_allowed_ptr function. * Cleanup CPU_MASK_ALL and NODE_MASK_ALL uses. Depends on: [sched-devel]: sched: add new set_cpus_allowed_ptr function Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
f70316dace
commit
f9a86fcbbb
4 changed files with 26 additions and 30 deletions
|
@ -20,8 +20,8 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */
|
|||
extern int cpuset_init_early(void);
|
||||
extern int cpuset_init(void);
|
||||
extern void cpuset_init_smp(void);
|
||||
extern cpumask_t cpuset_cpus_allowed(struct task_struct *p);
|
||||
extern cpumask_t cpuset_cpus_allowed_locked(struct task_struct *p);
|
||||
extern void cpuset_cpus_allowed(struct task_struct *p, cpumask_t *mask);
|
||||
extern void cpuset_cpus_allowed_locked(struct task_struct *p, cpumask_t *mask);
|
||||
extern nodemask_t cpuset_mems_allowed(struct task_struct *p);
|
||||
#define cpuset_current_mems_allowed (current->mems_allowed)
|
||||
void cpuset_init_current_mems_allowed(void);
|
||||
|
@ -84,13 +84,14 @@ static inline int cpuset_init_early(void) { return 0; }
|
|||
static inline int cpuset_init(void) { return 0; }
|
||||
static inline void cpuset_init_smp(void) {}
|
||||
|
||||
static inline cpumask_t cpuset_cpus_allowed(struct task_struct *p)
|
||||
static inline void cpuset_cpus_allowed(struct task_struct *p, cpumask_t *mask)
|
||||
{
|
||||
return cpu_possible_map;
|
||||
*mask = cpu_possible_map;
|
||||
}
|
||||
static inline cpumask_t cpuset_cpus_allowed_locked(struct task_struct *p)
|
||||
static inline void cpuset_cpus_allowed_locked(struct task_struct *p,
|
||||
cpumask_t *mask)
|
||||
{
|
||||
return cpu_possible_map;
|
||||
*mask = cpu_possible_map;
|
||||
}
|
||||
|
||||
static inline nodemask_t cpuset_mems_allowed(struct task_struct *p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue