diff options
| author | Thomas Gleixner <[email protected]> | 2012-10-09 21:20:05 +0200 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2012-10-09 21:20:05 +0200 |
| commit | db8c246937713e60b7628661ccc187eeb81f2bae (patch) | |
| tree | 6351e8bca23eef40fce85396d1c6f6cfffbd4b66 /include/linux/task_work.h | |
| parent | c5f66e99b7cb091e3d51ae8e8156892e8feb7fa3 (diff) | |
| parent | 28f2b02bc581ffc835bc1691b18d03f62fcf0395 (diff) | |
Merge branch 'fortglx/3.7/time' of git://git.linaro.org/people/jstultz/linux into timers/core
Diffstat (limited to 'include/linux/task_work.h')
| -rw-r--r-- | include/linux/task_work.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/include/linux/task_work.h b/include/linux/task_work.h index 294d5d5e90b1..fb46b03b1852 100644 --- a/include/linux/task_work.h +++ b/include/linux/task_work.h @@ -4,29 +4,21 @@ #include <linux/list.h> #include <linux/sched.h> -struct task_work; -typedef void (*task_work_func_t)(struct task_work *); - -struct task_work { - struct hlist_node hlist; - task_work_func_t func; - void *data; -}; +typedef void (*task_work_func_t)(struct callback_head *); static inline void -init_task_work(struct task_work *twork, task_work_func_t func, void *data) +init_task_work(struct callback_head *twork, task_work_func_t func) { twork->func = func; - twork->data = data; } -int task_work_add(struct task_struct *task, struct task_work *twork, bool); -struct task_work *task_work_cancel(struct task_struct *, task_work_func_t); +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); void task_work_run(void); static inline void exit_task_work(struct task_struct *task) { - if (unlikely(!hlist_empty(&task->task_works))) + if (unlikely(task->task_works)) task_work_run(); } |