Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lush_workqueue_prep_pwqs - prepare pwqs for workqueue flushing*@wq: workqueue being flushed*@flush_color: new flush color, < 0 for no-op*@work_color: new work color, < 0 for no-op* Prepare pwqs for workqueue flushing

Proto:static bool flush_workqueue_prep_pwqs(struct workqueue_struct *wq, int flush_color, int work_color)

Type:bool

Parameter:

TypeParameterName
struct workqueue_struct *wq
intflush_color
intwork_color
2719  bool wait = false
2722  If flush_color >= 0 Then
2723  WARN_ON_ONCE(atomic_read( & lush in progress ))
2724  atomic_set( & lush in progress , 1)
2727  r_each_pwq - iterate through all pool_workqueues of the specified workqueue*@pwq: iteration cursor*@wq: the target workqueue* This must be called either with wq->mutex held or RCU read locked(pwq, wq)
2728  pool = I: the associated pool
2730  spin_lock_irq( & he pool lock )
2732  If flush_color >= 0 Then
2735  If nr_in_flight[flush_color] Then
2742  If work_color >= 0 Then
2747  spin_unlock_irq( & he pool lock )
2750  If flush_color >= 0 && atomic_dec_and_test( & lush in progress ) Then complete( & lush completion )
2753  Return wait
Caller
NameDescribe
flush_workqueuelush_workqueue - ensure that any scheduled work has run to completion.*@wq: workqueue to flush* This function sleeps until all work items which were queued on entry* have finished execution, but it is not livelocked by new incoming ones.