diff options
Diffstat (limited to 'litmus/sched_edf_wm.c')
-rw-r--r-- | litmus/sched_edf_wm.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/litmus/sched_edf_wm.c b/litmus/sched_edf_wm.c index 34f8421afdf5..f3627ad1174a 100644 --- a/litmus/sched_edf_wm.c +++ b/litmus/sched_edf_wm.c | |||
@@ -433,7 +433,20 @@ static void wm_release_at(struct task_struct *t, lt_t start) | |||
433 | release_at(t, start); | 433 | release_at(t, start); |
434 | } | 434 | } |
435 | 435 | ||
436 | static void wm_task_wake_up(struct task_struct *t ) | 436 | static lt_t wm_earliest_release(struct task_struct *t, lt_t now) |
437 | { | ||
438 | lt_t deadline; | ||
439 | if (is_sliced_task(t)) | ||
440 | deadline = tsk_rt(t)->semi_part.wm.job_deadline; | ||
441 | else | ||
442 | deadline = get_deadline(t); | ||
443 | if (lt_before(deadline, now)) | ||
444 | return now; | ||
445 | else | ||
446 | return deadline; | ||
447 | } | ||
448 | |||
449 | static void wm_task_wake_up(struct task_struct *t) | ||
437 | { | 450 | { |
438 | unsigned long flags; | 451 | unsigned long flags; |
439 | wm_domain_t* dom = domain_of_task(t); | 452 | wm_domain_t* dom = domain_of_task(t); |
@@ -454,7 +467,7 @@ static void wm_task_wake_up(struct task_struct *t ) | |||
454 | /* account sleep time as execution time */ | 467 | /* account sleep time as execution time */ |
455 | if (get_exec_time(t) + sleep_time >= get_exec_cost(t)) { | 468 | if (get_exec_time(t) + sleep_time >= get_exec_cost(t)) { |
456 | /* new sporadic release */ | 469 | /* new sporadic release */ |
457 | wm_release_at(t, now); | 470 | wm_release_at(t, wm_earliest_release(t, now)); |
458 | sched_trace_task_release(t); | 471 | sched_trace_task_release(t); |
459 | } else if (is_sliced_task(t)) { | 472 | } else if (is_sliced_task(t)) { |
460 | /* figure out which slice we should be executing on */ | 473 | /* figure out which slice we should be executing on */ |