aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
Diffstat (limited to 'litmus')
-rw-r--r--litmus/sched_edf_wm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/litmus/sched_edf_wm.c b/litmus/sched_edf_wm.c
index f3627ad1174a..44e05948980c 100644
--- a/litmus/sched_edf_wm.c
+++ b/litmus/sched_edf_wm.c
@@ -505,14 +505,22 @@ static void wm_task_wake_up(struct task_struct *t)
505 505
506static void wm_task_block(struct task_struct *t) 506static void wm_task_block(struct task_struct *t)
507{ 507{
508 wm_domain_t* dom = domain_of_task(t);
509 unsigned long flags;
508 lt_t now = litmus_clock(); 510 lt_t now = litmus_clock();
509 /* only running tasks can block, thus t is in no queue */ 511
510 TRACE_TASK(t, "block at %llu, state=%d\n", now, t->state); 512 TRACE_TASK(t, "block at %llu, state=%d\n", now, t->state);
511 513
512 tsk_rt(t)->semi_part.wm.suspend_time = now; 514 tsk_rt(t)->semi_part.wm.suspend_time = now;
513 515
516 raw_spin_lock_irqsave(&dom->slock, flags);
517 if (is_queued(t)) {
518 TRACE_TASK(t, "still queued; migration invariant failed?\n");
519 remove(&dom->domain, t);
520 }
521 raw_spin_unlock_irqrestore(&dom->slock, flags);
522
514 BUG_ON(!is_realtime(t)); 523 BUG_ON(!is_realtime(t));
515 BUG_ON(is_queued(t));
516} 524}
517 525
518static void wm_task_exit(struct task_struct * t) 526static void wm_task_exit(struct task_struct * t)