diff options
author | Namhoon Kim <namhoonk@cs.unc.edu> | 2015-01-28 09:26:59 -0500 |
---|---|---|
committer | Namhoon Kim <namhoonk@cs.unc.edu> | 2015-01-28 09:26:59 -0500 |
commit | 5ba38eb6290a0c1767932c03b15edb0627ffd6b2 (patch) | |
tree | 8b1221cf821755ff7de26bf3fe375596e26d64d4 /include | |
parent | ca538aafd7cebfd09a47af0a628647620a6bba35 (diff) |
LV cwip-mc2-ver2
Diffstat (limited to 'include')
-rw-r--r-- | include/litmus/reservation.h | 22 |
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 | ||
136 | void reservation_init(struct reservation *res); | 138 | void 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 | /* | ||
205 | typedef enum { | ||
206 | EVENT_REPLENISH = 0, | ||
207 | EVENT_DRAIN, | ||
208 | EVENT_OTHERS, | ||
209 | } event_type_t; | ||
210 | */ | ||
202 | 211 | ||
203 | struct next_timer_event { | 212 | struct 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 { | |||
231 | void gmp_init(struct gmp_reservation_environment* gmp_env); | 242 | void gmp_init(struct gmp_reservation_environment* gmp_env); |
232 | void gmp_add_new_reservation(struct gmp_reservation_environment* gmp_env, | 243 | void gmp_add_new_reservation(struct gmp_reservation_environment* gmp_env, |
233 | struct reservation* new_res); | 244 | struct reservation* new_res); |
234 | void gmp_update_time(struct gmp_reservation_environment* gmp_env, lt_t now); | 245 | void gmp_scheduler_update_after(struct gmp_reservation_environment* gmp_env, |
246 | lt_t timeout); | ||
247 | bool gmp_update_time(struct gmp_reservation_environment* gmp_env, lt_t now); | ||
235 | struct task_struct* gmp_dispatch(struct gmp_reservation_environment* gmp_env); | 248 | struct task_struct* gmp_dispatch(struct gmp_reservation_environment* gmp_env); |
236 | struct 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); |
250 | struct next_timer_event* gmp_find_event_by_time(struct gmp_reservation_environment* gmp_env, lt_t when); | ||
237 | struct reservation* gmp_find_by_id(struct gmp_reservation_environment* gmp_env, | 251 | struct reservation* gmp_find_by_id(struct gmp_reservation_environment* gmp_env, |
238 | unsigned int id); | 252 | unsigned int id); |
239 | 253 | ||