Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1574714 > unrolled thread

[PATCH 87/89] sched/headers: Move the sched_exec() prototype to <linux/sched/task.h>

Started byIngo Molnar <mingo@kernel.org>
First post2017-02-06 14:40 +0100
Last post2017-02-06 14:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 87/89] sched/headers: Move the sched_exec() prototype to  <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-06 14:40 +0100

#1574714 — [PATCH 87/89] sched/headers: Move the sched_exec() prototype to <linux/sched/task.h>

FromIngo Molnar <mingo@kernel.org>
Date2017-02-06 14:40 +0100
Subject[PATCH 87/89] sched/headers: Move the sched_exec() prototype to <linux/sched/task.h>
Message-ID<t7RGs-5x6-83@gated-at.bofh.it>
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.

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/sched.h      | 7 -------
 include/linux/sched/task.h | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index f541a57a4b74..e2e4c7b85e1a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1234,13 +1234,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);
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h
index 61fafba43833..ecd3c6b414a2 100644
--- a/include/linux/sched/task.h
+++ b/include/linux/sched/task.h
@@ -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);
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web