Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__cancel_work_timer

Proto:static bool __cancel_work_timer(struct work_struct *work, bool is_dwork)

Type:bool

Parameter:

TypeParameterName
struct work_struct *work
boolis_dwork
3082  DECLARE_WAIT_QUEUE_HEAD(cancel_waitq)
3086  Do
3087  ret = ry_to_grab_pending - steal work item from worklist and disable irq*@work: work item to steal*@is_dwork: @work is a delayed_work*@flags: place to store irq state* Try to grab PENDING bit of @work. This function can handle @work in any
3107  init_wait( & wait)
3108  func = cwt_wakefn
3109  work = work
3113  If work_is_canceling(work) Then schedule()
3115  finish_wait( & cancel_waitq, & wait)
3117  When Value for the false possibility is greater at compile time(ret < 0) cycle
3120  mark_work_canceling(work)
3121  local_irq_restore(flags)
3127  If can kworkers be created yet? Then __flush_work(work, true)
3130  clear_work_data(work)
3137  smp_mb()
3138  If waitqueue_active -- locklessly test for waiters on the queue*@wq_head: the waitqueue to test for waiters* returns true if the wait list is not empty* NOTE: this function is lockless and requires care, incorrect usage _will_ Then __wake_up( & cancel_waitq, Convenience macros for the sake of wake_up(): , 1, work)
3141  Return ret
Caller
NameDescribe
cancel_work_syncancel_work_sync - cancel a work and wait for it to finish*@work: the work to cancel* Cancel @work and wait for its execution to finish. This function* can be used even if the work re-queues itself or migrates to* another workqueue
cancel_delayed_work_syncancel_delayed_work_sync - cancel a delayed work and wait for it to finish*@dwork: the delayed work cancel* This is cancel_work_sync() for delayed works.* Return:* %true if @dwork was pending, %false otherwise.