diff options
| author | James Morris <james.l.morris@oracle.com> | 2012-08-17 20:42:30 +1000 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2012-08-17 20:42:30 +1000 |
| commit | 51b743fe87d7fb3dba7a2ff4a1fe23bb65dc2245 (patch) | |
| tree | f8b8f601713a3ecb264eb9f145636343d9350520 /include/linux/task_work.h | |
| parent | 9f99798ff49e73dded73a8c674044ea6fb6af651 (diff) | |
| parent | d9875690d9b89a866022ff49e3fcea892345ad92 (diff) | |
Merge tag 'v3.6-rc2' into next
Linux 3.6-rc2
Resync with Linus.
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(); } |
