aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2012-09-06 08:40:15 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2012-10-18 16:14:10 -0400
commit9e6b747ce5c8ae700441d42d84c723832d91ecf8 (patch)
treea0e387e9ae8cae137c8d25403806bc7c0c6fccb1
parent3e491287675ebc65aadb0356c028d81d9f7a66ad (diff)
P-FP: be paranoid in the preemption case
Crash and burn if an expected preemption didn't happen. This is useful to flag any bugs in the queue management code...
-rw-r--r--litmus/sched_pfp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/litmus/sched_pfp.c b/litmus/sched_pfp.c
index f69b6f61dfeb..2165e1c79df5 100644
--- a/litmus/sched_pfp.c
+++ b/litmus/sched_pfp.c
@@ -225,6 +225,11 @@ static struct task_struct* pfp_schedule(struct task_struct * prev)
225 if (pfp->scheduled && !blocks && !migrate) 225 if (pfp->scheduled && !blocks && !migrate)
226 requeue(pfp->scheduled, pfp); 226 requeue(pfp->scheduled, pfp);
227 next = fp_prio_take(&pfp->ready_queue); 227 next = fp_prio_take(&pfp->ready_queue);
228 /* If preempt is set, we should not see the same task again. */
229 BUG_ON(preempt && next == prev);
230 /* Similarly, if preempt is set, then next may not be NULL,
231 * unless it's a migration. */
232 BUG_ON(preempt && !migrate && next == NULL);
228 } else 233 } else
229 /* Only override Linux scheduler if we have a real-time task 234 /* Only override Linux scheduler if we have a real-time task
230 * scheduled that needs to continue. 235 * scheduled that needs to continue.