History

sched: Consolidate open coded preemptible() checks

preempt_schedule() and preempt_schedule_context() open code their preemptability checks. Use the standard API instead for consolidation.

Frederic Weisbecker committed 13 years ago

Commit fbb00b51 parent ae920eb2 files · +2 −5Browse files

Showing the changes to kernel/context_tracking.c (1 of 2 files). Show all

Unified · Split

kernel/context_tracking.c+1−2
@@ -87,10 +87,9 @@ void user_enter(void) · 86 unmodified lines
87 */87 */
88void __sched notrace preempt_schedule_context(void)88void __sched notrace preempt_schedule_context(void)
89{89{
90 struct thread_info *ti = current_thread_info();
91 enum ctx_state prev_ctx;90 enum ctx_state prev_ctx;
92 91
93 if (likely(ti->preempt_count || irqs_disabled()))92 if (likely(!preemptible()))
94 return;93 return;
95 94
96 /*95 /*