aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/stop_task.c
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2013-07-10 12:34:34 -0400
committerNamhoon Kim <namhoonk@cs.unc.edu>2014-10-21 10:03:11 -0400
commit1042b270f038a2c654d93aa3fd8b9ae9abe542d9 (patch)
tree2690fd1f2f225a28b00fc0d6506318731151ada3 /kernel/sched/stop_task.c
parentd40f1cc129917e9478d48658073e46462968b973 (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.
Diffstat (limited to 'kernel/sched/stop_task.c')
-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