Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:worker_attach_to_pool() - attach a worker to a pool*@worker: worker to be attached*@pool: the target pool* Attach @worker to @pool. Once attached, the %WORKER_UNBOUND flag and* cpu-binding of @worker are kept coordinated with the pool across

Proto:static void worker_attach_to_pool(struct worker *worker, struct worker_pool *pool)

Type:void

Parameter:

TypeParameterName
struct worker *worker
struct worker_pool *pool
1838  mutex_lock( & wq_pool_attach_mutex)
1844  set_cpus_allowed_ptr(I: worker task , @cpumask: allowed CPUs)
1851  If X: flags & POOL_DISASSOCIATED Then X: flags |= WORKER_UNBOUND
1854  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
1855  A: the associated pool = pool
1857  mutex_unlock( & wq_pool_attach_mutex)
Caller
NameDescribe
create_workerreate_worker - create a new workqueue worker*@pool: pool the new worker will belong to* Create and start a new worker which is attached to @pool.* CONTEXT:* Might sleep. Does GFP_KERNEL allocations.* Return:* Pointer to the newly created worker.
rescuer_threadscuer_thread - the rescuer thread function*@__rescuer: self* Workqueue rescuer thread function