aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2013-07-10 12:34:34 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2013-08-07 03:46:52 -0400
commita8ffcb17006ab6e278526ae8ab75d15fd08d030f (patch)
treebec0d92d5d733fb7998293e26bae16aa0f02f596
parent15a3dd60f0dc56db35d3335e7ea0ea8ab67eedfb (diff)
Call sched_state_task_picked() from pick_next_task_stop()
Otherwise, the scheduler state machine becomes confused (and goes into a rescheduling loop) when stop-machine is triggered.
-rw-r--r--kernel/sched/stop_task.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c
index da5eb5bed84a..6835d31dd45b 100644
--- a/kernel/sched/stop_task.c
+++ b/kernel/sched/stop_task.c
@@ -1,5 +1,7 @@
1#include "sched.h" 1#include "sched.h"
2 2
3#include <litmus/preempt.h>
4
3/* 5/*
4 * stop-task scheduling class. 6 * stop-task scheduling class.
5 * 7 *
@@ -29,6 +31,12 @@ static struct task_struct *pick_next_task_stop(struct rq *rq)
29 31
30 if (stop && stop->on_rq) { 32 if (stop && stop->on_rq) {
31 stop->se.exec_start = rq->clock_task; 33 stop->se.exec_start = rq->clock_task;
34 /* Let the LITMUS^RT scheduler state machine know
35 * that a task was picked. This is needed because the
36 * LITMUS^RT scheduling plugin will not be called
37 * if the stop-task class picks a task.
38 */
39 sched_state_task_picked();
32 return stop; 40 return stop;
33 } 41 }
34 42