aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2013-06-08 17:06:20 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2013-06-08 17:06:20 -0400
commit244d30476a6fa49d67c13ecf3751d2fa33785b4a (patch)
treecca5ff5fb5a5d66c6d0c922602c6daaebf08d15d
parent78ae3306ff8b63a4592044aa28c2f2cbc1d36b20 (diff)
P-FP: fix admission of suspended task
This commit fixes admission of suspended tasks under the P-FP plugin analogously to commit 78ae3306ff8b63a4592044aa28c2f2cbc1d36b20.
-rw-r--r--litmus/sched_pfp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/litmus/sched_pfp.c b/litmus/sched_pfp.c
index aade09044917..6113ae376bec 100644
--- a/litmus/sched_pfp.c
+++ b/litmus/sched_pfp.c
@@ -296,7 +296,7 @@ static void pfp_finish_switch(struct task_struct *prev)
296 296
297/* Prepare a task for running in RT mode 297/* Prepare a task for running in RT mode
298 */ 298 */
299static void pfp_task_new(struct task_struct * t, int on_rq, int running) 299static void pfp_task_new(struct task_struct * t, int on_rq, int is_scheduled)
300{ 300{
301 pfp_domain_t* pfp = task_pfp(t); 301 pfp_domain_t* pfp = task_pfp(t);
302 unsigned long flags; 302 unsigned long flags;
@@ -307,15 +307,12 @@ static void pfp_task_new(struct task_struct * t, int on_rq, int running)
307 /* setup job parameters */ 307 /* setup job parameters */
308 release_at(t, litmus_clock()); 308 release_at(t, litmus_clock());
309 309
310 /* The task should be running in the queue, otherwise signal
311 * code will try to wake it up with fatal consequences.
312 */
313 raw_spin_lock_irqsave(&pfp->slock, flags); 310 raw_spin_lock_irqsave(&pfp->slock, flags);
314 if (running) { 311 if (is_scheduled) {
315 /* there shouldn't be anything else running at the time */ 312 /* there shouldn't be anything else running at the time */
316 BUG_ON(pfp->scheduled); 313 BUG_ON(pfp->scheduled);
317 pfp->scheduled = t; 314 pfp->scheduled = t;
318 } else { 315 } else if (is_running(t)) {
319 requeue(t, pfp); 316 requeue(t, pfp);
320 /* maybe we have to reschedule */ 317 /* maybe we have to reschedule */
321 pfp_preempt_check(pfp); 318 pfp_preempt_check(pfp);