diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-27 09:24:13 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-22 23:57:55 +0400 |
commit | 158e1645e07f3e9f7e4962d7a0997f5c3b98311b (patch) | |
tree | 09d695b3a0410afe15f7fd6006bc6c1effee151d /include/linux/task_work.h | |
parent | 41f9d29f09ca0b22c3631e8a39676e74cda9bcc0 (diff) | |
download | linux-158e1645e07f3e9f7e4962d7a0997f5c3b98311b.tar.xz |
trim task_work: get rid of hlist
layout based on Oleg's suggestion; single-linked list,
task->task_works points to the last element, forward pointer
from said last element points to head. I'd still prefer
much more regular scheme with two pointers in task_work,
but...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/task_work.h')
-rw-r--r-- | include/linux/task_work.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/task_work.h b/include/linux/task_work.h index 627421c0e108..3b3e2c8d037b 100644 --- a/include/linux/task_work.h +++ b/include/linux/task_work.h @@ -8,7 +8,7 @@ struct task_work; typedef void (*task_work_func_t)(struct task_work *); struct task_work { - struct hlist_node hlist; + struct task_work *next; task_work_func_t func; }; @@ -24,7 +24,7 @@ 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(); } |