Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__kthread_cancel_work_sync

Proto:static bool __kthread_cancel_work_sync(struct kthread_work *work, bool is_dwork)

Type:bool

Parameter:

TypeParameterName
struct kthread_work *work
boolis_dwork
1082  worker = worker
1084  int ret = false
1086  If Not worker Then Go to out
1089  raw_spin_lock_irqsave( & lock, flags)
1091  WARN_ON_ONCE(worker != worker)
1093  ret = This function removes the work from the worker queue
1095  If current_work != work Then Go to out_fast
1102  Number of canceling calls that are running at the moment. ++
1103  raw_spin_unlock_irqrestore( & lock, flags)
1104  kthread_flush_work - flush a kthread_work*@work: work to flush* If @work is queued or executing, wait for it to finish execution.
1105  raw_spin_lock_irqsave( & lock, flags)
1106  Number of canceling calls that are running at the moment. --
1108  out_fast :
1109  raw_spin_unlock_irqrestore( & lock, flags)
1110  out :
1111  Return ret
Caller
NameDescribe
kthread_cancel_work_synckthread_cancel_work_sync - cancel a kthread work and wait for it to finish*@work: the kthread work to cancel* Cancel @work and wait for its execution to finish. This function* can be used even if the work re-queues itself. On return from this
kthread_cancel_delayed_work_synckthread_cancel_delayed_work_sync - cancel a kthread delayed work and* wait for it to finish.*@dwork: the kthread delayed work to cancel* This is kthread_cancel_work_sync() for delayed works.* Return: %true if @dwork was pending, %false otherwise.