函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kthread.c Create Date:2022-07-27 10:31:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__kthread_cancel_work_sync

函数原型:static bool __kthread_cancel_work_sync(struct kthread_work *work, bool is_dwork)

返回类型:bool

参数:

类型参数名称
struct kthread_work *work
boolis_dwork
1082  worker等于worker
1084  int ret = false
1086  如果非worker则转到: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  如果current_work不等于work则转到: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  返回:ret
调用者
名称描述
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.