]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
sched/headers: Move the sched_exec() prototype to <linux/sched/task.h>
authorIngo Molnar <mingo@kernel.org>
Mon, 6 Feb 2017 10:12:45 +0000 (11:12 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 3 Mar 2017 00:45:26 +0000 (01:45 +0100)
sched_exec() better fits into the task lifetime APIs than into the core scheduler
APIs.

This reduces the size of <linux/sched.h> a bit.

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 b68358c605604eff8d1f9ffb53d4f495bb1747c1..bd89fc17767c1c5bf566ff659ccd86e7b6b7c6c0 100644 (file)
@@ -1258,13 +1258,6 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p,
 #define cpu_relax_yield() cpu_relax()
 #endif
 
-/* sched_exec is called by processes performing an exec */
-#ifdef CONFIG_SMP
-extern void sched_exec(void);
-#else
-#define sched_exec()   {}
-#endif
-
 extern int yield_to(struct task_struct *p, bool preempt);
 extern void set_user_nice(struct task_struct *p, long nice);
 extern int task_prio(const struct task_struct *p);
index 3886ae64148f1ee69b9936fc5da601844ed6b12b..a978d7189cfddd3f83cc15b68dd187a65068e816 100644 (file)
@@ -77,6 +77,13 @@ extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
 
 extern void free_task(struct task_struct *tsk);
 
+/* sched_exec is called by processes performing an exec */
+#ifdef CONFIG_SMP
+extern void sched_exec(void);
+#else
+#define sched_exec()   {}
+#endif
+
 #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
 
 extern void __put_task_struct(struct task_struct *t);