#ifdef CONFIG_SCHED_AUTOGROUP #include #include struct autogroup { /* * reference doesn't mean how many thread attach to this * autogroup now. It just stands for the number of task * could use this autogroup. */ struct kref kref; struct task_group *tg; struct rw_semaphore lock; unsigned long id; int nice; }; extern void autogroup_init(struct task_struct *init_task); extern void autogroup_free(struct task_group *tg); static inline bool task_group_is_autogroup(struct task_group *tg) { return !!tg->autogroup; } extern bool task_wants_autogroup(struct task_struct *p, struct task_group *tg); static inline struct task_group * autogroup_task_group(struct task_struct *p, struct task_group *tg) { int enabled = READ_ONCE(sysctl_sched_autogroup_enabled); if (enabled && task_wants_autogroup(p, tg)) return p->signal->autogroup->tg; return tg; } extern int autogroup_path(struct task_group *tg, char *buf, int buflen); #else /* !CONFIG_SCHED_AUTOGROUP */ static inline void autogroup_init(struct task_struct *init_task) { } static inline void autogroup_free(struct task_group *tg) { } static inline bool task_group_is_autogroup(struct task_group *tg) { return 0; } static inline struct task_group * autogroup_task_group(struct task_struct *p, struct task_group *tg) { return tg; } #ifdef CONFIG_SCHED_DEBUG static inline int autogroup_path(struct task_group *tg, char *buf, int buflen) { return 0; } #endif #endif /* CONFIG_SCHED_AUTOGROUP */ d>Tobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-03 13:46:38 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-03 13:46:38 -0800
commit3f67790d2b7e322bcf363ec717085dd78c3ea7cd (patch)
tree7be20232078a2e801ed93bcdb72f0d955dd9836f /drivers/usb/mtu3/mtu3_dr.c
parentcd44691f7177b2c1e1509d1a17d9b198ebaa34eb (diff)
parent206c4720092d2a24bfefc041b377e889a220ffbf (diff)
Merge tag 'regulator-fix-v4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown: "Three changes here: two run of the mill driver specific fixes and a change from Mark Rutland which reverts some new device specific ACPI binding code which was added during the merge window as there are concerns about this sending the wrong signal about usage of regulators in ACPI systems" * tag 'regulator-fix-v4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: fixed: Revert support for ACPI interface regulator: axp20x: AXP806: Fix dcdcb being set instead of dcdce regulator: twl6030: fix range comparison, allowing vsel = 59
Diffstat (limited to 'drivers/usb/mtu3/mtu3_dr.c')