涌泉闪闪@原创空间
letmego163
全部博文(123)
2012年(3)
2011年(10)
2010年(100)
2009年(10)
周宏1990
xsd123
firo
chen7293
Lvqear
is_jnlu
hzj_001
zzkkll99
cynthia
Bsolar
分类: LINUX
2010-09-10 14:58:14
static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep) {
/* check if p->state is uninterruptible */ if (task_contributes_to_load(p)) rq->nr_uninterruptible++;
/* it will call dequeue_task in specific schedule class */ dequeue_task(rq, p, sleep);
/* rq->nr_running-- */ dec_nr_running(rq); }
static void dequeue_task(struct rq *rq, struct task_struct *p, int sleep) { if (sleep) {
/* current task had been wake up last time */ if (p->se.last_wakeup) { update_avg(&p->se.avg_overlap, p->se.sum_exec_runtime - p->se.last_wakeup); p->se.last_wakeup = 0; } else { update_avg(&p->se.avg_wakeup, sysctl_sched_wakeup_granularity); } } sched_info_dequeued(p); p->sched_class->dequeue_task(rq, p, sleep); p->se.on_rq = 0; }
上一篇:为x86 64体系结构添加系统调用
下一篇:context_switch()详解
登录 注册