函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__task_rq_lock - lock the rq @p resides on.

函数原型:struct rq *__task_rq_lock(struct task_struct *p, struct rq_flags *rf)__acquires(rq->lock)

返回类型:struct rq

参数:

类型参数名称
struct task_struct *p
struct rq_flags *rf
84  lockdep_assert_held( & Protection of the PI data structures: )
86  循环
87  rq等于task_rq(p)
88  raw_spin_lock( & 运行队列锁)
90  rq_pin_lock(rq, rf)
91  返回:rq
93  raw_spin_unlock( & 运行队列锁)
95 此条件成立可能性小(为编译器优化)(task_on_rq_migrating(p))循环
96  cpu_relax()
调用者
名称描述
ttwu_remoteCalled in case the task @p isn't fully descheduled from its runqueue,* in this case we must do a remote wakeup. Its a 'light' wakeup though,* since all we need to do is flip p->state to TASK_RUNNING, since* the task is still ->on_rq.
wake_up_new_taskwake_up_new_task - wake up a newly created task for the first time.* This function will do some initial scheduler statistics housekeeping* that must be done for every newly created context, then puts the task* on the runqueue and wakes it.