Пример #1
0
static void dequeue_task_other_rr(struct rq *rq, struct task_struct *p, int sleep)
{
	// first update the task's runtime statistics
	update_curr_other_rr(rq);

	list_del(&p->other_rr_run_list);
	rq->other_rr.nr_running -= 1;
}
Пример #2
0
/*
 * task_tick_other_rr is invoked on each scheduler timer tick.
 */
static void task_tick_other_rr(struct rq *rq, struct task_struct *p, int queued)
{
	// first update the task's runtime statistics
	update_curr_other_rr(rq);

	if(other_rr_time_slice != 0)
	{
		p->task_time_slice--;

		if(p->task_time_slice == 0)
		{
			p->task_time_slice = other_rr_time_slice;
			set_tsk_need_resched(p);
			requeue_task_other_rr(rq, rq->curr);
		}
	}
}
Пример #3
0
static void put_prev_task_other_rr(struct rq *rq, struct task_struct *p)
{
	update_curr_other_rr(rq);
	p->se.exec_start = 0;
}