staging: et131x: checkpatch fixes for et1310_address_map.h (All 'do not add new typed...
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / kernel / sched_autogroup.h
blob05577055cfcaa4dc7ac055cb495f8e4ac97d96c4
1 #ifdef CONFIG_SCHED_AUTOGROUP
3 struct autogroup {
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 */
9 struct kref kref;
10 struct task_group *tg;
11 struct rw_semaphore lock;
12 unsigned long id;
13 int nice;
16 static inline struct task_group *
17 autogroup_task_group(struct task_struct *p, struct task_group *tg);
19 #else /* !CONFIG_SCHED_AUTOGROUP */
21 static inline void autogroup_init(struct task_struct *init_task) { }
22 static inline void autogroup_free(struct task_group *tg) { }
23 static inline bool task_group_is_autogroup(struct task_group *tg)
25 return 0;
28 static inline struct task_group *
29 autogroup_task_group(struct task_struct *p, struct task_group *tg)
31 return tg;
34 #ifdef CONFIG_SCHED_DEBUG
35 static inline int autogroup_path(struct task_group *tg, char *buf, int buflen)
37 return 0;
39 #endif
41 #endif /* CONFIG_SCHED_AUTOGROUP */