Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-28 09:35:26
Last Modify:2022-05-22 13:40:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__task_rq_lock - lock the rq @p resides on.

Proto:struct rq *__task_rq_lock(struct task_struct *p, struct rq_flags *rf)__acquires(rq->lock)

Type:struct rq

Parameter:

TypeParameterName
struct task_struct *p
struct rq_flags *rf
84  lockdep_assert_held( & Protection of the PI data structures: )
86  cycle
87  rq = task_rq(p)
88  raw_spin_lock( & runqueue lock: )
90  rq_pin_lock(rq, rf)
91  Return rq
93  raw_spin_unlock( & runqueue lock: )
95  When Value for the false possibility is greater at compile time(task_on_rq_migrating(p)) cycle
96  cpu_relax()
Caller
NameDescribe
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.