diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 79392916d6c9..011db2f4c94c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1419,6 +1419,9 @@ struct task_struct { | |||
1419 | #endif | 1419 | #endif |
1420 | }; | 1420 | }; |
1421 | 1421 | ||
1422 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ | ||
1423 | #define tsk_cpumask(tsk) (&(tsk)->cpus_allowed) | ||
1424 | |||
1422 | /* | 1425 | /* |
1423 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | 1426 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT |
1424 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | 1427 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH |
@@ -2201,17 +2204,7 @@ static inline int spin_needbreak(spinlock_t *lock) | |||
2201 | * Thread group CPU time accounting. | 2204 | * Thread group CPU time accounting. |
2202 | */ | 2205 | */ |
2203 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); | 2206 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); |
2204 | 2207 | void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); | |
2205 | static inline | ||
2206 | void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times) | ||
2207 | { | ||
2208 | struct thread_group_cputimer *cputimer = &tsk->signal->cputimer; | ||
2209 | unsigned long flags; | ||
2210 | |||
2211 | spin_lock_irqsave(&cputimer->lock, flags); | ||
2212 | *times = cputimer->cputime; | ||
2213 | spin_unlock_irqrestore(&cputimer->lock, flags); | ||
2214 | } | ||
2215 | 2208 | ||
2216 | static inline void thread_group_cputime_init(struct signal_struct *sig) | 2209 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
2217 | { | 2210 | { |
@@ -2301,9 +2294,13 @@ extern long sched_group_rt_runtime(struct task_group *tg); | |||
2301 | extern int sched_group_set_rt_period(struct task_group *tg, | 2294 | extern int sched_group_set_rt_period(struct task_group *tg, |
2302 | long rt_period_us); | 2295 | long rt_period_us); |
2303 | extern long sched_group_rt_period(struct task_group *tg); | 2296 | extern long sched_group_rt_period(struct task_group *tg); |
2297 | extern int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk); | ||
2304 | #endif | 2298 | #endif |
2305 | #endif | 2299 | #endif |
2306 | 2300 | ||
2301 | extern int task_can_switch_user(struct user_struct *up, | ||
2302 | struct task_struct *tsk); | ||
2303 | |||
2307 | #ifdef CONFIG_TASK_XACCT | 2304 | #ifdef CONFIG_TASK_XACCT |
2308 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | 2305 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) |
2309 | { | 2306 | { |