diff options
Diffstat (limited to 'litmus/rt_domain.c')
-rw-r--r-- | litmus/rt_domain.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/litmus/rt_domain.c b/litmus/rt_domain.c index b615092ce9c9..3b3b49ed48ea 100644 --- a/litmus/rt_domain.c +++ b/litmus/rt_domain.c | |||
@@ -261,7 +261,6 @@ static void setup_release(rt_domain_t *_rt) | |||
261 | list_for_each_safe(pos, safe, &list) { | 261 | list_for_each_safe(pos, safe, &list) { |
262 | /* pick task of work list */ | 262 | /* pick task of work list */ |
263 | t = list_entry(pos, struct task_struct, rt_param.list); | 263 | t = list_entry(pos, struct task_struct, rt_param.list); |
264 | /* sched_trace_task_release(t); */ | ||
265 | list_del_init(pos); | 264 | list_del_init(pos); |
266 | 265 | ||
267 | /* put into release heap while holding release_lock */ | 266 | /* put into release heap while holding release_lock */ |
@@ -412,24 +411,19 @@ static void pd_requeue(domain_t *dom, struct task_struct *task) | |||
412 | { | 411 | { |
413 | rt_domain_t *domain = (rt_domain_t*)dom->data; | 412 | rt_domain_t *domain = (rt_domain_t*)dom->data; |
414 | 413 | ||
415 | BUG_ON(!task || !is_realtime(task)); | ||
416 | TRACE_TASK(task, "Requeueing\n"); | 414 | TRACE_TASK(task, "Requeueing\n"); |
415 | BUG_ON(!task || !is_realtime(task)); | ||
417 | BUG_ON(is_queued(task)); | 416 | BUG_ON(is_queued(task)); |
418 | BUG_ON(get_task_domain(task) != dom); | 417 | BUG_ON(get_task_domain(task) != dom); |
419 | 418 | ||
420 | if (is_queued(task)) { | ||
421 | VTRACE_TASK(task, "Queued, skipping\n"); | ||
422 | return; | ||
423 | } | ||
424 | |||
425 | if (is_released(task, litmus_clock())) { | 419 | if (is_released(task, litmus_clock())) { |
426 | __add_ready(domain, task); | 420 | __add_ready(domain, task); |
427 | VTRACE("going, rt: adding %s/%d (%llu, %llu) rel=%llu to ready queue at %llu\n", | 421 | VTRACE("rt: adding %s/%d (%llu, %llu) rel=%llu to ready queue at %llu\n", |
428 | task->comm, task->pid, get_exec_cost(task), get_rt_period(task), | 422 | task->comm, task->pid, get_exec_cost(task), get_rt_period(task), |
429 | get_release(task), litmus_clock()); | 423 | get_release(task), litmus_clock()); |
430 | } else { | 424 | } else { |
431 | /* task has to wait for next release */ | 425 | /* task has to wait for next release */ |
432 | VTRACE_TASK(task, "not going, add release(), rel=%llu\n", get_release(task)); | 426 | VTRACE_TASK(task, "add release(), rel=%llu\n", get_release(task)); |
433 | add_release(domain, task); | 427 | add_release(domain, task); |
434 | } | 428 | } |
435 | 429 | ||
@@ -441,9 +435,8 @@ static void pd_requeue(domain_t *dom, struct task_struct *task) | |||
441 | */ | 435 | */ |
442 | static struct task_struct* pd_take_ready(domain_t *dom) | 436 | static struct task_struct* pd_take_ready(domain_t *dom) |
443 | { | 437 | { |
444 | struct task_struct *t = __take_ready((rt_domain_t*)dom->data); | 438 | return __take_ready((rt_domain_t*)dom->data); |
445 | return t; | 439 | } |
446 | } | ||
447 | 440 | ||
448 | /* pd_peek_ready - returns the head of the rt_domain ready queue | 441 | /* pd_peek_ready - returns the head of the rt_domain ready queue |
449 | * | 442 | * |
@@ -451,8 +444,7 @@ static struct task_struct* pd_take_ready(domain_t *dom) | |||
451 | */ | 444 | */ |
452 | static struct task_struct* pd_peek_ready(domain_t *dom) | 445 | static struct task_struct* pd_peek_ready(domain_t *dom) |
453 | { | 446 | { |
454 | struct task_struct *t = __peek_ready((rt_domain_t*)dom->data); | 447 | return __next_ready((rt_domain_t*)dom->data); |
455 | return t; | ||
456 | } | 448 | } |
457 | 449 | ||
458 | static void pd_remove(domain_t *dom, struct task_struct *task) | 450 | static void pd_remove(domain_t *dom, struct task_struct *task) |