]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - kernel/sched_autogroup.h
Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-artful-kernel.git] / kernel / sched_autogroup.h
CommitLineData
5091faa4
MG
1#ifdef CONFIG_SCHED_AUTOGROUP
2
3struct autogroup {
800d4d30
YZ
4 /*
5 * reference doesn't mean how many thread attach to this
6 * autogroup now. It just stands for the number of task
7 * could use this autogroup.
8 */
5091faa4
MG
9 struct kref kref;
10 struct task_group *tg;
11 struct rw_semaphore lock;
12 unsigned long id;
13 int nice;
14};
15
16static inline struct task_group *
17autogroup_task_group(struct task_struct *p, struct task_group *tg);
18
19#else /* !CONFIG_SCHED_AUTOGROUP */
20
21static inline void autogroup_init(struct task_struct *init_task) { }
22static inline void autogroup_free(struct task_group *tg) { }
f4493771
MG
23static inline bool task_group_is_autogroup(struct task_group *tg)
24{
25 return 0;
26}
5091faa4
MG
27
28static inline struct task_group *
29autogroup_task_group(struct task_struct *p, struct task_group *tg)
30{
31 return tg;
32}
33
34#ifdef CONFIG_SCHED_DEBUG
35static inline int autogroup_path(struct task_group *tg, char *buf, int buflen)
36{
37 return 0;
38}
39#endif
40
41#endif /* CONFIG_SCHED_AUTOGROUP */