aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-06-29 04:07:10 -0400
committerTejun Heo <tj@kernel.org>2010-06-29 04:07:10 -0400
commit4690c4ab56c71919893ca25252f2dd65b58188c7 (patch)
treedcdb5b7dd2104db2dc8babe66064dd6f5022247f /include/linux/workqueue.h
parentc790bce0481857412c964c5e9d46d56e41c4b051 (diff)
workqueue: misc/cosmetic updates
Make the following updates in preparation of concurrency managed workqueue. None of these changes causes any visible behavior difference. * Add comments and adjust indentations to data structures and several functions. * Rename wq_per_cpu() to get_cwq() and swap the position of two parameters for consistency. Convert a direct per_cpu_ptr() access to wq->cpu_wq to get_cwq(). * Add work_static() and Update set_wq_data() such that it sets the flags part to WORK_STRUCT_PENDING | WORK_STRUCT_STATIC if static | @extra_flags. * Move santiy check on work->entry emptiness from queue_work_on() to __queue_work() which all queueing paths share. * Make __queue_work() take @cpu and @wq instead of @cwq. * Restructure flush_work() and __create_workqueue_key() to make them easier to modify. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
-rw-r--r--include/linux/workqueue.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 0697946c66a1..e724dafc9e6d 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -96,9 +96,14 @@ struct execute_work {
96#ifdef CONFIG_DEBUG_OBJECTS_WORK 96#ifdef CONFIG_DEBUG_OBJECTS_WORK
97extern void __init_work(struct work_struct *work, int onstack); 97extern void __init_work(struct work_struct *work, int onstack);
98extern void destroy_work_on_stack(struct work_struct *work); 98extern void destroy_work_on_stack(struct work_struct *work);
99static inline unsigned int work_static(struct work_struct *work)
100{
101 return *work_data_bits(work) & (1 << WORK_STRUCT_STATIC);
102}
99#else 103#else
100static inline void __init_work(struct work_struct *work, int onstack) { } 104static inline void __init_work(struct work_struct *work, int onstack) { }
101static inline void destroy_work_on_stack(struct work_struct *work) { } 105static inline void destroy_work_on_stack(struct work_struct *work) { }
106static inline unsigned int work_static(struct work_struct *work) { return 0; }
102#endif 107#endif
103 108
104/* 109/*