Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\workqueue.c Create Date:2022-07-28 09:23:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Return the first idle worker. Safe with preemption disabled

Proto:static struct worker *first_idle_worker(struct worker_pool *pool)

Type:struct worker

Parameter:

TypeParameterName
struct worker_pool *pool
816  If Value for the false possibility is greater at compile time(list_empty - tests whether a list is empty*@head: the list to test.) Then Return NULL
819  Return list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & X: list of idle workers , structworker, entry)
Caller
NameDescribe
wake_up_workerwake_up_worker - wake up an idle worker*@pool: worker pool to wake worker from* Wake up the first idle worker of @pool.* CONTEXT:* spin_lock_irq(pool->lock).
wq_worker_sleepingwq_worker_sleeping - a worker is going to sleep*@task: task going to sleep* This function is called from schedule() when a busy worker is* going to sleep.
put_unbound_poolput_unbound_pool - put a worker_pool*@pool: worker_pool to put* Put @pool