schedstat_inc(rq, yld_count);
current->sched_class->yield_task(rq);
- DTRACE_SCHED1(surrender, struct task_struct *, current);
-
/*
* Since we are going to call schedule() anyway, there's
* no need to preempt or enable interrupts:
do_raw_spin_unlock(&rq->lock);
sched_preempt_enable_no_resched();
+ DTRACE_SCHED1(surrender, struct task_struct *, current);
schedule();
return 0;
yielded = curr->sched_class->yield_to_task(rq, p, preempt);
if (yielded) {
- DTRACE_SCHED1(surrender, struct task_struct *, curr);
-
schedstat_inc(rq, yld_count);
/*
* Make p's CPU reschedule; pick_next_entity takes care of
out_irq:
local_irq_restore(flags);
- if (yielded > 0)
+ if (yielded > 0) {
+ DTRACE_SCHED1(surrender, struct task_struct *, curr);
schedule();
+ }
return yielded;
}