aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/reservation.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/reservation.h')
-rw-r--r--include/litmus/reservation.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/include/litmus/reservation.h b/include/litmus/reservation.h
index 0e656ad2667e..fc7e31918a60 100644
--- a/include/litmus/reservation.h
+++ b/include/litmus/reservation.h
@@ -129,8 +129,10 @@ struct reservation {
129 129
130 /* for global env. */ 130 /* for global env. */
131 int scheduled_on; 131 int scheduled_on;
132 /* for blocked by ghost */ 132 /* for blocked by ghost. Do not charge budget when ACTIVE */
133 int blocked_by_ghost; 133 int blocked_by_ghost;
134 /* ghost_job. If it is clear, do not charge budget when ACTIVE_IDLE */
135 int is_ghost;
134}; 136};
135 137
136void reservation_init(struct reservation *res); 138void reservation_init(struct reservation *res);
@@ -199,11 +201,19 @@ struct reservation* sup_find_by_id(struct sup_reservation_environment* sup_env,
199 unsigned int id); 201 unsigned int id);
200 202
201/* A global multiprocessor reservation environment. */ 203/* A global multiprocessor reservation environment. */
204/*
205typedef enum {
206 EVENT_REPLENISH = 0,
207 EVENT_DRAIN,
208 EVENT_OTHERS,
209} event_type_t;
210*/
202 211
203struct next_timer_event { 212struct next_timer_event {
204 lt_t next_update; 213 lt_t next_update;
205 int timer_armed_on; 214 int timer_armed_on;
206 unsigned int id; 215 //unsigned int id;
216 //event_type_t type;
207 struct list_head list; 217 struct list_head list;
208}; 218};
209 219
@@ -222,6 +232,7 @@ struct gmp_reservation_environment {
222 232
223 /* timer event ordered by next_update */ 233 /* timer event ordered by next_update */
224 struct list_head next_events; 234 struct list_head next_events;
235
225 /* (schedule_now == true) means call gmp_dispatch() now */ 236 /* (schedule_now == true) means call gmp_dispatch() now */
226 bool schedule_now; 237 bool schedule_now;
227 /* set to true if a call to gmp_dispatch() is imminent */ 238 /* set to true if a call to gmp_dispatch() is imminent */
@@ -231,9 +242,12 @@ struct gmp_reservation_environment {
231void gmp_init(struct gmp_reservation_environment* gmp_env); 242void gmp_init(struct gmp_reservation_environment* gmp_env);
232void gmp_add_new_reservation(struct gmp_reservation_environment* gmp_env, 243void gmp_add_new_reservation(struct gmp_reservation_environment* gmp_env,
233 struct reservation* new_res); 244 struct reservation* new_res);
234void gmp_update_time(struct gmp_reservation_environment* gmp_env, lt_t now); 245void gmp_scheduler_update_after(struct gmp_reservation_environment* gmp_env,
246 lt_t timeout);
247bool gmp_update_time(struct gmp_reservation_environment* gmp_env, lt_t now);
235struct task_struct* gmp_dispatch(struct gmp_reservation_environment* gmp_env); 248struct task_struct* gmp_dispatch(struct gmp_reservation_environment* gmp_env);
236struct next_timer_event* gmp_find_event_by_id(struct gmp_reservation_environment* gmp_env, unsigned int id); 249//struct next_timer_event* gmp_find_event_by_id(struct gmp_reservation_environment* gmp_env, unsigned int id);
250struct next_timer_event* gmp_find_event_by_time(struct gmp_reservation_environment* gmp_env, lt_t when);
237struct reservation* gmp_find_by_id(struct gmp_reservation_environment* gmp_env, 251struct reservation* gmp_find_by_id(struct gmp_reservation_environment* gmp_env,
238 unsigned int id); 252 unsigned int id);
239 253