函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ask_work_cancel - cancel a pending work added by task_work_add()*@task: the task which should execute the work*@func: identifies the work to remove* Find the last queued pending work with ->func == @func and remove* it from queue.* RETURNS:

函数原型:struct callback_head *task_work_cancel(struct task_struct *task, task_work_func_t func)

返回类型:struct callback_head

参数:

类型参数名称
struct task_struct *task
task_work_func_tfunc
58  pprev等于回调队列
62  如果此条件成立可能性大(为编译器优化)(!回调队列)则返回:NULL
70  raw_spin_lock_irqsave( & Protection of the PI data structures: , flags)
71 work等于READ_ONCE( * pprev)循环
72  如果func不等于funcpprev等于next
74  否则如果cmpxchg(pprev, work, next)恒等于work退出
77  raw_spin_unlock_irqrestore( & Protection of the PI data structures: , flags)
79  返回:work
调用者
名称描述
irq_threadInterrupt handler thread
keyctl_session_to_parentAttempt to install the calling process's session keyring on the process's* parent process.* The keyring must exist and must grant the caller LINK permission, and the* parent process must be single-threaded and must have the same effective