From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751848AbdBHTmt (ORCPT ); Wed, 8 Feb 2017 14:42:49 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34786 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751153AbdBHTmr (ORCPT ); Wed, 8 Feb 2017 14:42:47 -0500 From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Andrew Morton , Linus Torvalds , Mike Galbraith , Oleg Nesterov , Peter Zijlstra , Thomas Gleixner Subject: [PATCH 53/53] sched/headers: Move the sched_exec() prototype to Date: Wed, 8 Feb 2017 19:45:24 +0100 Message-Id: <1486579524-14901-54-git-send-email-mingo@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486579524-14901-1-git-send-email-mingo@kernel.org> References: <1486579524-14901-1-git-send-email-mingo@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sched_exec() better fits into the task lifetime APIs than into the core scheduler APIs. This reduces the size of a bit. Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- 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 fded01c60cf3..814f7c731e9f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1254,13 +1254,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 3886ae64148f..a978d7189cfd 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