aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_mc.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2011-10-09 22:07:46 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2011-10-09 22:07:46 -0400
commitba42974ea389f7f69800ddb39c7072f5252cbf98 (patch)
treed6019bb43aeae579118260c354a5dcfed3d7df4c /litmus/sched_mc.c
parentbc92369ba24f72b916384ed80d4381549c6537a7 (diff)
Allow events to be cancelled when their list is processed
Diffstat (limited to 'litmus/sched_mc.c')
-rw-r--r--litmus/sched_mc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/litmus/sched_mc.c b/litmus/sched_mc.c
index 61eb961eda23..1d1ecbb8c9c4 100644
--- a/litmus/sched_mc.c
+++ b/litmus/sched_mc.c
@@ -407,10 +407,10 @@ static void preempt(struct domain *dom, struct crit_entry *ce)
407 TRACE_CRIT_ENTRY(ce, "Preempted by " TS "\n", TA(task)); 407 TRACE_CRIT_ENTRY(ce, "Preempted by " TS "\n", TA(task));
408 408
409 /* Per-domain preemption */ 409 /* Per-domain preemption */
410 link_task_to_crit(ce, task);
410 if (old && can_requeue(old)) { 411 if (old && can_requeue(old)) {
411 dom->requeue(dom, old); 412 dom->requeue(dom, old);
412 } 413 }
413 link_task_to_crit(ce, task);
414 update_crit_position(ce); 414 update_crit_position(ce);
415 415
416 /* Preempt actual execution if this is a running task */ 416 /* Preempt actual execution if this is a running task */
@@ -987,7 +987,8 @@ void mc_finish_switch(struct task_struct *prev)
987{ 987{
988 struct cpu_entry* entry = &__get_cpu_var(cpus); 988 struct cpu_entry* entry = &__get_cpu_var(cpus);
989 entry->scheduled = is_realtime(current) ? current : NULL; 989 entry->scheduled = is_realtime(current) ? current : NULL;
990 TRACE_TASK(prev, "Switched away from\n"); 990 TRACE_TASK(prev, "Switched away from to (something/%d)\n",
991 ((entry->scheduled) ? entry->scheduled->pid : 0));
991} 992}
992 993
993/* 994/*