diff options
-rw-r--r-- | litmus/reservations/gedf_reservation.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/litmus/reservations/gedf_reservation.c b/litmus/reservations/gedf_reservation.c index e5a19e6de663..e08d3f9799e8 100644 --- a/litmus/reservations/gedf_reservation.c +++ b/litmus/reservations/gedf_reservation.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <litmus/bheap.h> | 8 | #include <litmus/bheap.h> |
9 | #include <litmus/rt_domain.h> | 9 | #include <litmus/rt_domain.h> |
10 | #include <litmus/jobs.h> | 10 | #include <litmus/jobs.h> |
11 | #include <litmus/budget.h> | ||
11 | #include <litmus/np.h> | 12 | #include <litmus/np.h> |
12 | #include <litmus/sched_trace.h> | 13 | #include <litmus/sched_trace.h> |
13 | #include <litmus/debug_trace.h> | 14 | #include <litmus/debug_trace.h> |
@@ -208,7 +209,11 @@ static struct task_struct* gedf_task_dispatch_client( | |||
208 | lt_t* time_slice, | 209 | lt_t* time_slice, |
209 | int cpu) | 210 | int cpu) |
210 | { | 211 | { |
211 | return ((struct gedf_task_reservation*)res)->task; | 212 | struct gedf_task_reservation* tmp = (struct gedf_task_reservation*)res; |
213 | if (budget_exhausted(tmp->task)) | ||
214 | return NULL; | ||
215 | else | ||
216 | return tmp->task; | ||
212 | } | 217 | } |
213 | 218 | ||
214 | static void gedf_replenish_budget( | 219 | static void gedf_replenish_budget( |