diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2012-09-05 16:17:42 +0200 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2012-09-05 16:17:42 +0200 |
| commit | 188ce5abebf56ec732f652abe608b94c317e4963 (patch) | |
| tree | 23bda38c221abb46b566a1aef36029eab00a50b9 /include/linux/task_work.h | |
| parent | 362b0563b28506d534a82d9c6cd5fdf58783fda6 (diff) | |
| parent | a4881cc45a3fab4488e16c4934e149cfa620f1a9 (diff) | |
| download | cachepc-linux-188ce5abebf56ec732f652abe608b94c317e4963.tar.gz cachepc-linux-188ce5abebf56ec732f652abe608b94c317e4963.zip | |
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next
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(); } |
