Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:work_busy - test whether a work is currently pending or running*@work: the work to be tested* Test whether @work is currently pending or running. There is no* synchronization around this function and the test result is

Proto:unsigned int work_busy(struct work_struct *work)

Type:unsigned int

Parameter:

TypeParameterName
struct work_struct *work
4549  ret = 0
4551  If work_pending - Find out whether a work item is currently pending*@work: The work item in question(work) Then ret |= WORK_BUSY_PENDING
4554  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
4555  pool = get_work_pool - return the worker_pool a given work was associated with*@work: the work item of interest* Pools are created and destroyed under wq_pool_mutex, and allows read* access under RCU read lock. As such, this function should be
4556  If pool Then
4557  spin_lock_irqsave( & he pool lock , flags)
4558  If d_worker_executing_work - find worker which is executing a work*@pool: pool of interest*@work: work to find worker for* Find a worker which is executing @work on @pool by searching*@pool->busy_hash which is keyed by the address of @work Then ret |= WORK_BUSY_RUNNING
4560  spin_unlock_irqrestore( & he pool lock , flags)
4562  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
4564  Return ret