diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-21 22:56:29 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-22 00:42:37 -0400 |
commit | 71c1eccba179e158ad22eb454ad10df0f3b71a47 (patch) | |
tree | bdaa6e20b90e8edc079249c286df88d7a53ba278 | |
parent | 0acc5e8a1d7caa74f644ac92cab2d958cf508d6e (diff) |
GSN/PSN: Update processor state on task exit
Without this change, a BUG_ON() in schedule() triggers.
-rw-r--r-- | litmus/sched_gsn_edf.c | 4 | ||||
-rw-r--r-- | litmus/sched_psn_edf.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c index fb2200bc93..1d84591c9c 100644 --- a/litmus/sched_gsn_edf.c +++ b/litmus/sched_gsn_edf.c | |||
@@ -583,6 +583,10 @@ static void gsnedf_task_exit(struct task_struct * t) | |||
583 | /* unlink if necessary */ | 583 | /* unlink if necessary */ |
584 | spin_lock_irqsave(&gsnedf_lock, flags); | 584 | spin_lock_irqsave(&gsnedf_lock, flags); |
585 | unlink(t); | 585 | unlink(t); |
586 | if (tsk_rt(t)->scheduled_on != NO_CPU) { | ||
587 | gsnedf_cpus[tsk_rt(t)->scheduled_on]->scheduled = NULL; | ||
588 | tsk_rt(t)->scheduled_on = NO_CPU; | ||
589 | } | ||
586 | spin_unlock_irqrestore(&gsnedf_lock, flags); | 590 | spin_unlock_irqrestore(&gsnedf_lock, flags); |
587 | 591 | ||
588 | BUG_ON(!is_realtime(t)); | 592 | BUG_ON(!is_realtime(t)); |
diff --git a/litmus/sched_psn_edf.c b/litmus/sched_psn_edf.c index a36a350160..42b5665c44 100644 --- a/litmus/sched_psn_edf.c +++ b/litmus/sched_psn_edf.c | |||
@@ -288,6 +288,8 @@ static void psnedf_task_exit(struct task_struct * t) | |||
288 | edf = task_edf(t); | 288 | edf = task_edf(t); |
289 | remove(edf, t); | 289 | remove(edf, t); |
290 | } | 290 | } |
291 | if (pedf->scheduled == t) | ||
292 | pedf->scheduled = NULL; | ||
291 | preempt(pedf); | 293 | preempt(pedf); |
292 | spin_unlock_irqrestore(&pedf->slock, flags); | 294 | spin_unlock_irqrestore(&pedf->slock, flags); |
293 | } | 295 | } |