Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1574756
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 58/89] sched/headers: Move the 'root_task_group' declaration to <linux/sched/autogroup.h> |
| Date | 2017-02-06 14:50 +0100 |
| Message-ID | <t7RQ8-5AW-71@gated-at.bofh.it> (permalink) |
| References | <t7RGp-5x6-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Also remove the duplicate declaration from <linux/init_task.h>.
( That declaration was originally duplicated for dependency hell reasons,
but there's no problem including the much smaller <linux/sched/autogroup.h>
header now, to pick up the right prototype. )
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/init_task.h | 3 +--
include/linux/sched.h | 4 ----
include/linux/sched/autogroup.h | 5 +++++
kernel/sched/sched.h | 1 +
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 3a85d61f7614..fda57da8731b 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -12,6 +12,7 @@
#include <linux/securebits.h>
#include <linux/seqlock.h>
#include <linux/rbtree.h>
+#include <linux/sched/autogroup.h>
#include <net/net_namespace.h>
#include <linux/sched/rt.h>
@@ -149,8 +150,6 @@ extern struct group_info init_groups;
extern struct cred init_cred;
-extern struct task_group root_task_group;
-
#ifdef CONFIG_CGROUP_SCHED
# define INIT_CGROUP_SCHED(tsk) \
.sched_task_group = &root_task_group,
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 10fe373612fb..eed8d9148b23 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1706,10 +1706,6 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask);
extern long sched_getaffinity(pid_t pid, struct cpumask *mask);
-#ifdef CONFIG_CGROUP_SCHED
-extern struct task_group root_task_group;
-#endif /* CONFIG_CGROUP_SCHED */
-
#ifndef TASK_SIZE_OF
#define TASK_SIZE_OF(tsk) TASK_SIZE
#endif
diff --git a/include/linux/sched/autogroup.h b/include/linux/sched/autogroup.h
index c0810fe196f4..55cd496df884 100644
--- a/include/linux/sched/autogroup.h
+++ b/include/linux/sched/autogroup.h
@@ -3,6 +3,7 @@
struct signal_struct;
struct task_struct;
+struct task_group;
struct seq_file;
#ifdef CONFIG_SCHED_AUTOGROUP
@@ -23,4 +24,8 @@ static inline void sched_autogroup_exit(struct signal_struct *sig) { }
static inline void sched_autogroup_exit_task(struct task_struct *p) { }
#endif
+#ifdef CONFIG_CGROUP_SCHED
+extern struct task_group root_task_group;
+#endif /* CONFIG_CGROUP_SCHED */
+
#endif /* _LINUX_SCHED_AUTOGROUP_H */
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 4e2fec3f12a0..b1f1c8443837 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1,5 +1,6 @@
#include <linux/sched.h>
+#include <linux/sched/autogroup.h>
#include <linux/sched/sysctl.h>
#include <linux/sched/topology.h>
#include <linux/sched/rt.h>
--
2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 58/89] sched/headers: Move the 'root_task_group' declaration to <linux/sched/autogroup.h> Ingo Molnar <mingo@kernel.org> - 2017-02-06 14:50 +0100 Re: [PATCH 58/89] sched/headers: Move the 'root_task_group' declaration to <linux/sched/autogroup.h> Peter Zijlstra <peterz@infradead.org> - 2017-02-06 16:00 +0100
csiph-web