函数源码 |
Source File:kernel\sched\fair.c |
Create Date:2022-07-27 10:39:27 |
首页 | Copyright©Brick |
10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 | /* * Priority of the task has changed. Check to see if we preempt * the current task. */ static void prio_changed_fair( struct rq *rq, struct task_struct *p, int oldprio) { if (!task_on_rq_queued(p)) return ; /* * Reschedule if we are currently running on this runqueue and * our priority decreased, or if we are not currently running on * this runqueue and our priority is higher than the current's */ if (rq->curr == p) { if (p->prio > oldprio) resched_curr(rq); } else check_preempt_curr(rq, p, 0); } |