aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-31 17:52:25 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-31 17:52:25 -0400
commit7b39625c7872be3b57a27e0a74cb7112b024ca9e (patch)
tree022d9b839d501127109e377857c7ce1002167459
parent6990544b6de202414e6564baa649ad260d83a9ca (diff)
WIP snapshot
-rw-r--r--litmus/sched_cedf.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c
index 7fd6276b3418..4f5bb26b339b 100644
--- a/litmus/sched_cedf.c
+++ b/litmus/sched_cedf.c
@@ -740,7 +740,7 @@ static struct task_struct* cedf_schedule(struct task_struct * prev)
740 struct task_struct* next = NULL; 740 struct task_struct* next = NULL;
741 741
742#ifdef CONFIG_LITMUS_LOCKING 742#ifdef CONFIG_LITMUS_LOCKING
743 int priodon, reeval; 743 int priodon;
744#else 744#else
745#define priodon 0 745#define priodon 0
746#endif 746#endif
@@ -823,20 +823,25 @@ static struct task_struct* cedf_schedule(struct task_struct * prev)
823 */ 823 */
824 824
825 if (!entry->linked) { 825 if (!entry->linked) {
826 struct task_struct *pulled = __take_ready(&cluster->domain);
827#ifdef CONFIG_LITMUS_LOCKING 826#ifdef CONFIG_LITMUS_LOCKING
828 if (pulled && !is_pending(pulled)) { 827 struct task_struct *pulled;
829 /* Pulled an un-processed task from the ready queue. 828 int reeval;
830 * Since this job was ready but not yet processed, it 829 do {
831 * cannot be a priority donor. So we should never 830 pulled = __take_ready(&cluster->domain);
832 * have to re-evaluate. 831 reeval = 0;
833 */ 832 if (pulled && !is_pending(pulled)) {
834 TRACE_TASK(pulled, "pulled unprocessed\n"); 833 /* Pulled an un-processed task from the ready queue. */
835 reeval = update_pending_job(cluster, pulled); 834 TRACE_TASK(pulled, "pulled unprocessed\n");
836 BUG_ON(reeval); 835 reeval = update_pending_job(cluster, pulled);
837 } 836 if (reeval)
838#endif 837 /* priority may have changed --- try again */
838 requeue(pulled);
839 }
840 } while (reeval);
839 link_task_to_cpu(pulled, entry); 841 link_task_to_cpu(pulled, entry);
842#else
843 link_task_to_cpu(__take_ready(&cluster->domain), entry);
844#endif
840 } 845 }
841 846
842 /* The final scheduling decision. Do we need to switch for some reason? 847 /* The final scheduling decision. Do we need to switch for some reason?