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
8787 */
8888 void __sched notrace preempt_schedule_context(void)
8989 {
90− struct thread_info *ti = current_thread_info();
9190 enum ctx_state prev_ctx;
9291
93− if (likely(ti->preempt_count || irqs_disabled()))
92+ if (likely(!preemptible()))
9493 return;
9594
9695 /*