sched/headers: Move 'init_task' and 'init_thread_union' from <linux/sched.h> to ...
authorIngo Molnar <mingo@kernel.org>
Sat, 4 Feb 2017 00:20:53 +0000 (01:20 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 3 Mar 2017 00:45:22 +0000 (01:45 +0100)
'init_task' is really not part of core scheduler APIs but part of
the fork() interface between the scheduler and process management.

So move the declarations.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/sched.h
include/linux/sched/task.h

index 3eb284741790c454e950ed47f29ff3fbe5e1543b..4ab105a2a8f9c4d88a63c14bb6534f81a3473df0 100644 (file)
@@ -1469,9 +1469,6 @@ static inline int kstack_end(void *addr)
 }
 #endif
 
-extern union thread_union init_thread_union;
-extern struct task_struct init_task;
-
 extern struct pid_namespace init_pid_ns;
 
 /*
index 20ed9108f26158074966e30b0530ec40600e9b83..1be049a18d1bce18b5c164067371f5dfa88d87f8 100644 (file)
@@ -8,6 +8,9 @@
 
 #include <linux/sched.h>
 
+struct task_struct;
+union thread_union;
+
 /*
  * This serializes "schedule()" and also protects
  * the run-queue from deletions/modifications (but
@@ -17,6 +20,9 @@
 extern rwlock_t tasklist_lock;
 extern spinlock_t mmlist_lock;
 
+extern union thread_union init_thread_union;
+extern struct task_struct init_task;
+
 #ifdef CONFIG_PROVE_RCU
 extern int lockdep_tasklist_lock_is_held(void);
 #endif /* #ifdef CONFIG_PROVE_RCU */