diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 383502dfda17..79c025c3b627 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -889,7 +889,8 @@ struct sched_class { | |||
889 | void (*set_curr_task) (struct rq *rq); | 889 | void (*set_curr_task) (struct rq *rq); |
890 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); | 890 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); |
891 | void (*task_new) (struct rq *rq, struct task_struct *p); | 891 | void (*task_new) (struct rq *rq, struct task_struct *p); |
892 | void (*set_cpus_allowed)(struct task_struct *p, cpumask_t *newmask); | 892 | void (*set_cpus_allowed)(struct task_struct *p, |
893 | const cpumask_t *newmask); | ||
893 | 894 | ||
894 | void (*join_domain)(struct rq *rq); | 895 | void (*join_domain)(struct rq *rq); |
895 | void (*leave_domain)(struct rq *rq); | 896 | void (*leave_domain)(struct rq *rq); |
@@ -1502,15 +1503,21 @@ static inline void put_task_struct(struct task_struct *t) | |||
1502 | #define used_math() tsk_used_math(current) | 1503 | #define used_math() tsk_used_math(current) |
1503 | 1504 | ||
1504 | #ifdef CONFIG_SMP | 1505 | #ifdef CONFIG_SMP |
1505 | extern int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask); | 1506 | extern int set_cpus_allowed_ptr(struct task_struct *p, |
1507 | const cpumask_t *new_mask); | ||
1506 | #else | 1508 | #else |
1507 | static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | 1509 | static inline int set_cpus_allowed_ptr(struct task_struct *p, |
1510 | const cpumask_t *new_mask) | ||
1508 | { | 1511 | { |
1509 | if (!cpu_isset(0, new_mask)) | 1512 | if (!cpu_isset(0, *new_mask)) |
1510 | return -EINVAL; | 1513 | return -EINVAL; |
1511 | return 0; | 1514 | return 0; |
1512 | } | 1515 | } |
1513 | #endif | 1516 | #endif |
1517 | static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | ||
1518 | { | ||
1519 | return set_cpus_allowed_ptr(p, &new_mask); | ||
1520 | } | ||
1514 | 1521 | ||
1515 | extern unsigned long long sched_clock(void); | 1522 | extern unsigned long long sched_clock(void); |
1516 | 1523 | ||