diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-04-15 14:07:08 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-04-15 14:07:08 -0400 |
commit | 7d791b6850ed52766ac1ed1adad2d03c34d3dc3b (patch) | |
tree | 4bf79a5b76596f4c1c0e3975565b16cd124a592b | |
parent | f40191fb654c9dc59697dfae13b891479317367b (diff) |
Bugfix: get right domain in unlink() even if linked_on == NO_CPU
- Why do I keep moving lines around without double checking it?? :|
-rw-r--r-- | litmus/sched_cedf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c index 86a66b46ff8b..dace343a62d9 100644 --- a/litmus/sched_cedf.c +++ b/litmus/sched_cedf.c | |||
@@ -246,10 +246,10 @@ static noinline void unlink(struct task_struct* t) | |||
246 | return; | 246 | return; |
247 | } | 247 | } |
248 | 248 | ||
249 | entry = &per_cpu(cedf_cpu_entries, t->rt_param.linked_on); | ||
250 | 249 | ||
251 | if (t->rt_param.linked_on != NO_CPU) { | 250 | if (t->rt_param.linked_on != NO_CPU) { |
252 | /* unlink */ | 251 | /* unlink */ |
252 | entry = &per_cpu(cedf_cpu_entries, t->rt_param.linked_on); | ||
253 | t->rt_param.linked_on = NO_CPU; | 253 | t->rt_param.linked_on = NO_CPU; |
254 | link_task_to_cpu(NULL, entry); | 254 | link_task_to_cpu(NULL, entry); |
255 | } else if (is_queued(t)) { | 255 | } else if (is_queued(t)) { |
@@ -259,8 +259,12 @@ static noinline void unlink(struct task_struct* t) | |||
259 | * been relinked to this CPU), thus it must be in some | 259 | * been relinked to this CPU), thus it must be in some |
260 | * queue. We must remove it from the list in this | 260 | * queue. We must remove it from the list in this |
261 | * case. | 261 | * case. |
262 | * | ||
263 | * in C-EDF case is should be somewhere in the queue for | ||
264 | * its domain, therefore and we can get the domain using | ||
265 | * task_cpu_cluster | ||
262 | */ | 266 | */ |
263 | remove(&(entry->cluster)->domain, t); | 267 | remove(&(task_cpu_cluster(t))->domain, t); |
264 | } | 268 | } |
265 | } | 269 | } |
266 | 270 | ||