aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_litmus.c
diff options
context:
space:
mode:
Diffstat (limited to 'litmus/sched_litmus.c')
-rw-r--r--litmus/sched_litmus.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/litmus/sched_litmus.c b/litmus/sched_litmus.c
index 64ad5db07795..c1fc7748e590 100644
--- a/litmus/sched_litmus.c
+++ b/litmus/sched_litmus.c
@@ -177,7 +177,13 @@ static void dequeue_task_litmus(struct rq *rq, struct task_struct *p, int sleep)
177static void yield_task_litmus(struct rq *rq) 177static void yield_task_litmus(struct rq *rq)
178{ 178{
179 BUG_ON(rq->curr != current); 179 BUG_ON(rq->curr != current);
180 litmus->complete_job(); 180 /* sched_yield() is called to trigger delayed preemptions.
181 * Thus, mark the current task as needing to be rescheduled.
182 * This will cause the scheduler plugin to be invoked, which can
183 * then determine if a preemption is still required.
184 */
185 clear_exit_np(current);
186 set_tsk_need_resched(current);
181} 187}
182 188
183/* Plugins are responsible for this. 189/* Plugins are responsible for this.