函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io-wq.c Create Date:2022-07-29 10:55:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:io_wqe_cancel_cb_work

函数原型:static enum io_wq_cancel io_wqe_cancel_cb_work(struct io_wqe *wqe, work_cancel_fn *cancel, void *cancel_data)

返回类型:enum io_wq_cancel

参数:

类型参数名称
struct io_wqe *wqe
work_cancel_fn *cancel
void *cancel_data
862  struct io_cb_cancel_data data = {wqe = wqe, cancel = cancel, caller_data = cancel_data, }
870  bool found = false
872  spin_lock_irqsave( & lock, flags)
874  work等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(node, structio_wq_work, list)
876  如果cancel(work, cancel_data)则
877  wq_node_del( & work_list, node, prev)
878  found = true
879  退出
882  spin_unlock_irqrestore( & lock, flags)
884  如果found
885  flags或等于IO_WQ_WORK_CANCEL
886  func( & work)
887  返回: cancelled before started
890  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
891  found等于Iterate the passed in list and call the specific function for each* worker that isn't exiting
892  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
893  返回:如果found found, running, and attempted cancelled 否则 work not found
调用者
名称描述
io_wq_cancel_cb