Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ask_work_add - ask the @task to execute @work->func()*@task: the task which should run the callback*@work: the callback to run*@notify: send the notification if true* Queue @work for task_work_run() below and notify the @task if @notify.

Proto:int task_work_add(struct task_struct *task, struct callback_head *work, bool notify)

Type:int

Parameter:

TypeParameterName
struct task_struct *task
struct callback_head *work
boolnotify
32  Do
33  head = READ_ONCE(task_works)
34  If Value for the false possibility is greater at compile time(head == & all we need is ->next == NULL ) Then Return -ESRCH
36  next = head
37  When cmpxchg( & task_works, head, work) != head cycle
39  If notify Then set_notify_resume - cause tracehook_notify_resume() to be called*@task: task that will call tracehook_notify_resume()* Calling this arranges that @task will call tracehook_notify_resume()* before returning to user mode
41  Return 0
Caller
NameDescribe
irq_threadInterrupt handler thread
uprobe_copy_processCalled in context of a new clone/fork from copy_process.
report_accessdefers execution because cmdline access can sleep
mntput_no_expire
__rdtgroup_move_task