diff options
author | Nathan O <otternes@cs.unc.edu> | 2019-12-10 21:33:28 -0500 |
---|---|---|
committer | Nathan O <otternes@cs.unc.edu> | 2019-12-10 21:33:28 -0500 |
commit | ec01ea7a3f09d246ab322f828d6c66b2704be485 (patch) | |
tree | 3af9aa035550ccb5ea2eec9c321cbb576b1fc71a /kernel/sched/litmus.c | |
parent | 3c4abebc788e9d92d776d7bc8b778f398cdb4010 (diff) |
Fix remaining compilation problems
- This change addresses additional changes that are needed to LITMUS
code so that the kernel is able to compile.
- The kernel is now able to compile.
- I will probably squash this commit with the previous commit sometime
later, so that all of the LITMUS-updating changes are in one commit
and easy to see, *if* this kernel works.
Diffstat (limited to 'kernel/sched/litmus.c')
-rw-r--r-- | kernel/sched/litmus.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/kernel/sched/litmus.c b/kernel/sched/litmus.c index d9c59998155b..aa43ed1e9eb5 100644 --- a/kernel/sched/litmus.c +++ b/kernel/sched/litmus.c | |||
@@ -264,10 +264,15 @@ static void put_prev_task_litmus(struct rq *rq, struct task_struct *p) | |||
264 | * return the next task to be scheduled | 264 | * return the next task to be scheduled |
265 | */ | 265 | */ |
266 | static struct task_struct *pick_next_task_litmus(struct rq *rq, | 266 | static struct task_struct *pick_next_task_litmus(struct rq *rq, |
267 | struct task_struct *prev, struct pin_cookie cookie) | 267 | struct task_struct *prev, struct rq_flags *rf) |
268 | { | 268 | { |
269 | struct task_struct *next; | 269 | struct task_struct *next; |
270 | 270 | // I don't know if this is correct, but rf may be NULL according to | |
271 | // sched.h, so I'm hoping NIL_COOKIE is safe to use in that case. | ||
272 | struct pin_cookie cookie = NIL_COOKIE; | ||
273 | if (rf) { | ||
274 | cookie = rf->cookie; | ||
275 | } | ||
271 | if (is_realtime(prev)) | 276 | if (is_realtime(prev)) |
272 | update_time_litmus(rq, prev); | 277 | update_time_litmus(rq, prev); |
273 | 278 | ||
@@ -323,9 +328,9 @@ unsigned int get_rr_interval_litmus(struct rq *rq, struct task_struct *p) | |||
323 | * mutex inheritance yet (and probably never will). Use LITMUS provided | 328 | * mutex inheritance yet (and probably never will). Use LITMUS provided |
324 | * synchronization primitives instead. | 329 | * synchronization primitives instead. |
325 | */ | 330 | */ |
326 | static void set_curr_task_litmus(struct rq *rq) | 331 | static void set_next_task_litmus(struct rq *rq, struct task_struct *p) |
327 | { | 332 | { |
328 | rq->curr->se.exec_start = rq->clock; | 333 | p->se.exec_start = rq->clock; |
329 | } | 334 | } |
330 | 335 | ||
331 | 336 | ||
@@ -374,7 +379,7 @@ const struct sched_class litmus_sched_class = { | |||
374 | .select_task_rq = select_task_rq_litmus, | 379 | .select_task_rq = select_task_rq_litmus, |
375 | #endif | 380 | #endif |
376 | 381 | ||
377 | .set_curr_task = set_curr_task_litmus, | 382 | .set_next_task = set_next_task_litmus, |
378 | .task_tick = task_tick_litmus, | 383 | .task_tick = task_tick_litmus, |
379 | 384 | ||
380 | .get_rr_interval = get_rr_interval_litmus, | 385 | .get_rr_interval = get_rr_interval_litmus, |