Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sched/headers: Move the sched_exec() prototype to <linux/sched/task.h>

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>

+7 -7
-7
include/linux/sched.h
··· 1258 1258 #define cpu_relax_yield() cpu_relax() 1259 1259 #endif 1260 1260 1261 - /* sched_exec is called by processes performing an exec */ 1262 - #ifdef CONFIG_SMP 1263 - extern void sched_exec(void); 1264 - #else 1265 - #define sched_exec() {} 1266 - #endif 1267 - 1268 1261 extern int yield_to(struct task_struct *p, bool preempt); 1269 1262 extern void set_user_nice(struct task_struct *p, long nice); 1270 1263 extern int task_prio(const struct task_struct *p);
+7
include/linux/sched/task.h
··· 77 77 78 78 extern void free_task(struct task_struct *tsk); 79 79 80 + /* sched_exec is called by processes performing an exec */ 81 + #ifdef CONFIG_SMP 82 + extern void sched_exec(void); 83 + #else 84 + #define sched_exec() {} 85 + #endif 86 + 80 87 #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) 81 88 82 89 extern void __put_task_struct(struct task_struct *t);