Blame view
include/linux/task_work.h
578 Bytes
e73f8959a
|
1 2 3 4 5 |
#ifndef _LINUX_TASK_WORK_H #define _LINUX_TASK_WORK_H #include <linux/list.h> #include <linux/sched.h> |
67d121455
|
6 |
typedef void (*task_work_func_t)(struct callback_head *); |
e73f8959a
|
7 8 |
static inline void |
67d121455
|
9 |
init_task_work(struct callback_head *twork, task_work_func_t func) |
e73f8959a
|
10 11 |
{ twork->func = func; |
e73f8959a
|
12 |
} |
67d121455
|
13 14 |
int task_work_add(struct task_struct *task, struct callback_head *twork, bool); struct callback_head *task_work_cancel(struct task_struct *, task_work_func_t); |
e73f8959a
|
15 16 17 18 |
void task_work_run(void); static inline void exit_task_work(struct task_struct *task) { |
9da33de62
|
19 |
task_work_run(); |
e73f8959a
|
20 21 22 |
} #endif /* _LINUX_TASK_WORK_H */ |