函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kthread_flush_work - flush a kthread_work*@work: work to flush* If @work is queued or executing, wait for it to finish execution.

函数原型:void kthread_flush_work(struct kthread_work *work)

返回类型:void

参数:

类型参数名称
struct kthread_work *work
953  struct kthread_flush_work fwork = {KTHREAD_WORK_INIT(work, kthread_flush_work_fn), COMPLETION_INITIALIZER_ONSTACK(done), }
958  bool noop = false
960  worker等于worker
961  如果非worker则返回
964  关闭本地中断,获取所要保护的运行队列(runqueue)的自旋锁(spinlock),为查找可运行进程做准备。( & lock)
966  WARN_ON_ONCE(worker != worker)
968  如果非链表为空sert @work before @pos in @worker
970  否则如果current_work恒等于worksert @work before @pos in @worker
973  否则noop = true
976  raw_spin_unlock_irq( & lock)
978  如果非noopwait_for_completion( & done)
调用者
名称描述
__kthread_cancel_work_sync