aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-28 16:43:04 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-28 16:43:04 -0400
commit7096c41337a97c78dbaf4a7f6db970e837e4136a (patch)
tree2d00e59e9b19d6cfe9f5ab5a11a015cd3408a18b
parentc2e44a1c21b9ed02c5e356f84e320e6d72b1b259 (diff)
C-EDF/GSN-EDF: fix non-preemptive section support
Don't unlink. The job was put into the ready queue when it was previously unlinked. If we remove it from the ready queue, then it won't ever be scheduled again.
-rw-r--r--litmus/sched_cedf.c6
-rw-r--r--litmus/sched_gsn_edf.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c
index 1950783c0388..295456bc3411 100644
--- a/litmus/sched_cedf.c
+++ b/litmus/sched_cedf.c
@@ -427,12 +427,10 @@ static struct task_struct* cedf_schedule(struct task_struct * prev)
427 unlink(entry->scheduled); 427 unlink(entry->scheduled);
428 428
429 /* Request a sys_exit_np() call if we would like to preempt but cannot. 429 /* Request a sys_exit_np() call if we would like to preempt but cannot.
430 * We need to make sure to update the link structure anyway in case 430 * Do not unlink since entry->scheduled is currently in the ready queue.
431 * that we are still linked. Multiple calls to request_exit_np() don't 431 * We don't process out_of_time and sleep until the job is preemptive again.
432 * hurt.
433 */ 432 */
434 if (np && (out_of_time || preempt || sleep)) { 433 if (np && (out_of_time || preempt || sleep)) {
435 unlink(entry->scheduled);
436 request_exit_np(entry->scheduled); 434 request_exit_np(entry->scheduled);
437 } 435 }
438 436
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c
index 26014437cc3e..dffea128739f 100644
--- a/litmus/sched_gsn_edf.c
+++ b/litmus/sched_gsn_edf.c
@@ -420,12 +420,10 @@ static struct task_struct* gsnedf_schedule(struct task_struct * prev)
420 unlink(entry->scheduled); 420 unlink(entry->scheduled);
421 421
422 /* Request a sys_exit_np() call if we would like to preempt but cannot. 422 /* Request a sys_exit_np() call if we would like to preempt but cannot.
423 * We need to make sure to update the link structure anyway in case 423 * Do not unlink since entry->scheduled is currently in the ready queue.
424 * that we are still linked. Multiple calls to request_exit_np() don't 424 * We don't process out_of_time and sleep until the job is preemptive again.
425 * hurt.
426 */ 425 */
427 if (np && (out_of_time || preempt || sleep)) { 426 if (np && (out_of_time || preempt || sleep)) {
428 unlink(entry->scheduled);
429 request_exit_np(entry->scheduled); 427 request_exit_np(entry->scheduled);
430 } 428 }
431 429