aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
authorJohn M. Calandrino <jmc@cs.unc.edu>2008-10-15 10:08:02 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-10-15 10:08:02 -0400
commit6e6ec5dd55b606596cefcc1fe3211e223cdc3eb1 (patch)
tree2ae59b988dbc2a01017b8559a7ed57abf8900a0a /litmus
parent43d4369f57f6c6a3316329246e9aba8c59af7b3c (diff)
PFAIR: fix priority function
Due to bad ordering of ()-pairs, the priority function was not correct. This should fix it.
Diffstat (limited to 'litmus')
-rwxr-xr-xlitmus/sched_pfair.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/litmus/sched_pfair.c b/litmus/sched_pfair.c
index e9944121f2..6c003582f2 100755
--- a/litmus/sched_pfair.c
+++ b/litmus/sched_pfair.c
@@ -172,21 +172,21 @@ static int pfair_higher_prio(struct task_struct* first,
172 * Then break by B-bit. 172 * Then break by B-bit.
173 */ 173 */
174 (cur_deadline(first) == cur_deadline(second) && 174 (cur_deadline(first) == cur_deadline(second) &&
175 cur_overlap(first) > cur_overlap(second)) || 175 (cur_overlap(first) > cur_overlap(second) ||
176 176
177 /* Do we have a B-bit tie? 177 /* Do we have a B-bit tie?
178 * Then break by group deadline. 178 * Then break by group deadline.
179 */ 179 */
180 (cur_overlap(first) == cur_overlap(second) && 180 (cur_overlap(first) == cur_overlap(second) &&
181 time_after(cur_group_deadline(first), 181 (time_after(cur_group_deadline(first),
182 cur_group_deadline(second))) || 182 cur_group_deadline(second)) ||
183 183
184 /* Do we have a group deadline tie? 184 /* Do we have a group deadline tie?
185 * Then break by PID, which are unique. 185 * Then break by PID, which are unique.
186 */ 186 */
187 (cur_group_deadline(first) == 187 (cur_group_deadline(first) ==
188 cur_group_deadline(second) && 188 cur_group_deadline(second) &&
189 first->pid < second->pid)); 189 first->pid < second->pid))))));
190} 190}
191 191
192int pfair_ready_order(struct heap_node* a, struct heap_node* b) 192int pfair_ready_order(struct heap_node* a, struct heap_node* b)