diff options
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/reservations/gedf_reservation.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/litmus/reservations/gedf_reservation.c b/litmus/reservations/gedf_reservation.c index a08373e28469..40c1ce412891 100644 --- a/litmus/reservations/gedf_reservation.c +++ b/litmus/reservations/gedf_reservation.c | |||
@@ -260,6 +260,9 @@ static void gedf_task_replenish_budget( | |||
260 | res->priority = ULLONG_MAX - res->replenishment_time - get_rt_relative_deadline(t); | 260 | res->priority = ULLONG_MAX - res->replenishment_time - get_rt_relative_deadline(t); |
261 | TRACE_TASK(t, "overrun budget!\n"); | 261 | TRACE_TASK(t, "overrun budget!\n"); |
262 | } | 262 | } |
263 | //TODO: hacky. reset exec_time so arm_enforcement_timer doesn't | ||
264 | // yell at us for trying to set timer while overrun budget | ||
265 | tsk_rt(t)->job_params.exec_time = 0; | ||
263 | res->budget_consumed = 0; | 266 | res->budget_consumed = 0; |
264 | res->cur_budget = get_exec_cost(t); | 267 | res->cur_budget = get_exec_cost(t); |
265 | } | 268 | } |
@@ -287,7 +290,8 @@ static void gedf_task_drain_budget( | |||
287 | { | 290 | { |
288 | struct task_struct* t = ((struct gedf_task_reservation*)res)->task; | 291 | struct task_struct* t = ((struct gedf_task_reservation*)res)->task; |
289 | 292 | ||
290 | if (how_much > res->cur_budget || is_completed(t)) | 293 | if (how_much > res->cur_budget || is_completed(t) || |
294 | (budget_enforced(t) && budget_exhausted(t))) | ||
291 | res->cur_budget = 0; | 295 | res->cur_budget = 0; |
292 | else | 296 | else |
293 | res->cur_budget -= how_much; | 297 | res->cur_budget -= how_much; |