函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-27 10:37:32
Last Modify:2022-05-22 13:40:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:yield_to - yield the current processor to another thread in* your thread group, or accelerate that thread toward the* processor it's on

函数原型:int __sched yield_to(struct task_struct *p, bool preempt)

返回类型:int

参数:

类型参数名称
struct task_struct *p
boolpreempt
5710  curr等于当前进程
5713  yielded等于0
5715  local_irq_save(flags)
5716  rq等于this_rq()
5718  again :
5719  p_rq等于task_rq(p)
5724  如果可运行进程数恒等于1且可运行进程数恒等于1则
5725  yielded等于负ESRCH
5726  转到:out_irq
5729  double_rq_lock - safely lock two runqueues* Note this does not disable interrupts like task_rq_lock,* you need to do so manually before calling.
5730  如果task_rq(p)不等于p_rq
5731  double_rq_unlock - safely unlock two runqueues* Note this does not restore interrupts like task_rq_unlock,* you need to do so manually after calling.
5732  转到:again
5735  如果非yield_to_task则转到:out_unlock
5738  如果调度函数不等于调度函数则转到:out_unlock
5741  如果task_running(p_rq, p)或任务状态则转到:out_unlock
5744  yielded等于yield_to_task(rq, p, preempt)
5745  如果yielded
5746  schedstat_inc(yld_count)
5751  如果preemptrq不等于p_rq标记当前进程需要被调度出去
5755  out_unlock :
5756  double_rq_unlock - safely unlock two runqueues* Note this does not restore interrupts like task_rq_unlock,* you need to do so manually after calling.
5757  out_irq :
5758  local_irq_restore(flags)
5760  如果yielded大于0则进程调度
5763  返回:yielded