static void requeue(struct task_struct* t, rt_domain_t *edf) { if (t->state != TASK_RUNNING) TRACE_TASK(t, "requeue: !TASK_RUNNING\n"); tsk_rt(t)->completed = 0; if (is_early_releasing(t) || is_released(t, litmus_clock())) __add_ready(edf, t); else add_release(edf, t); /* it has got to wait */ }
/* Add the task `tsk` to the appropriate queue. Assumes the caller holds the ready lock. */ static void demo_requeue(struct task_struct *tsk, struct demo_cpu_state *cpu_state) { if (is_released(tsk, litmus_clock())) { /* Uses __add_ready() instead of add_ready() because we already * hold the ready lock. */ __add_ready(&cpu_state->local_queues, tsk); } else { /* Uses add_release() because we DON'T have the release lock. */ add_release(&cpu_state->local_queues, tsk); } }