static void put_prev_task_stop(struct rq *rq, struct task_struct *prev) { struct task_struct *curr = rq->curr; u64 delta_exec; delta_exec = rq_clock_task(rq) - curr->se.exec_start; if (unlikely((s64)delta_exec < 0)) delta_exec = 0; schedstat_set(curr->se.statistics.exec_max, max(curr->se.statistics.exec_max, delta_exec)); curr->se.sum_exec_runtime += delta_exec; account_group_exec_runtime(curr, delta_exec); curr->se.exec_start = rq_clock_task(rq); cpuacct_charge(curr, delta_exec); }
static struct task_struct *pick_next_task_stop(struct rq *rq) { struct task_struct *stop = rq->stop; if (stop && stop->on_rq) { stop->se.exec_start = rq_clock_task(rq); return stop; } return NULL; }
static struct task_struct * pick_next_task_stop(struct rq *rq, struct task_struct *prev) { struct task_struct *stop = rq->stop; if (!stop || !stop->on_rq) return NULL; put_prev_task(rq, prev); stop->se.exec_start = rq_clock_task(rq); return stop; }
static struct task_struct * pick_next_task_stop(struct rq *rq, struct task_struct *prev, struct pin_cookie cookie) { struct task_struct *stop = rq->stop; if (!stop || !task_on_rq_queued(stop)) return NULL; put_prev_task(rq, prev); stop->se.exec_start = rq_clock_task(rq); return stop; }
static void set_curr_task_stop(struct rq *rq) { struct task_struct *stop = rq->stop; stop->se.exec_start = rq_clock_task(rq); }