aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2013-06-19 17:56:22 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2013-08-12 18:40:43 -0400
commitfbb00b568bc93073452d2a0f9f06e7c33d16eece (patch)
tree1e0d6f980341e3f7848717ba6e3ea9816e44baa4 /kernel/sched/core.c
parentae920eb24277e4a174a3ca575ce42b98b18a6748 (diff)
sched: Consolidate open coded preemptible() checks
preempt_schedule() and preempt_schedule_context() open code their preemptability checks. Use the standard API instead for consolidation. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Li Zhong <zhong@linux.vnet.ibm.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Alex Shi <alex.shi@intel.com> Cc: Paul Turner <pjt@google.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Vincent Guittot <vincent.guittot@linaro.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b7c32cb7bfeb..3fb7acee7326 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2510,13 +2510,11 @@ void __sched schedule_preempt_disabled(void)
2510 */ 2510 */
2511asmlinkage void __sched notrace preempt_schedule(void) 2511asmlinkage void __sched notrace preempt_schedule(void)
2512{ 2512{
2513 struct thread_info *ti = current_thread_info();
2514
2515 /* 2513 /*
2516 * If there is a non-zero preempt_count or interrupts are disabled, 2514 * If there is a non-zero preempt_count or interrupts are disabled,
2517 * we do not want to preempt the current task. Just return.. 2515 * we do not want to preempt the current task. Just return..
2518 */ 2516 */
2519 if (likely(ti->preempt_count || irqs_disabled())) 2517 if (likely(!preemptible()))
2520 return; 2518 return;
2521 2519
2522 do { 2520 do {