diff options
author | Tejun Heo <tj@kernel.org> | 2012-08-20 17:51:23 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-08-20 17:51:23 -0400 |
commit | ae930e0f4e66fd540c6fbad9f1e2a7743d8b9afe (patch) | |
tree | 88853ec727834081a79d56bb9829191ca6e243ec /include/linux/workqueue.h | |
parent | 606a5020b9bdceb20b4f43e11db0054afa349028 (diff) |
workqueue: gut system_nrt[_freezable]_wq()
Now that all workqueues are non-reentrant, system[_freezable]_wq() are
equivalent to system_nrt[_freezable]_wq(). Replace the latter with
wrappers around system[_freezable]_wq(). The wrapping goes through
inline functions so that __deprecated can be added easily.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
-rw-r--r-- | include/linux/workqueue.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 4f9d3bc161a2..855fcdaa2d72 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -297,10 +297,6 @@ enum { | |||
297 | * system_long_wq is similar to system_wq but may host long running | 297 | * system_long_wq is similar to system_wq but may host long running |
298 | * works. Queue flushing might take relatively long. | 298 | * works. Queue flushing might take relatively long. |
299 | * | 299 | * |
300 | * system_nrt_wq is non-reentrant and guarantees that any given work | ||
301 | * item is never executed in parallel by multiple CPUs. Queue | ||
302 | * flushing might take relatively long. | ||
303 | * | ||
304 | * system_unbound_wq is unbound workqueue. Workers are not bound to | 300 | * system_unbound_wq is unbound workqueue. Workers are not bound to |
305 | * any specific CPU, not concurrency managed, and all queued works are | 301 | * any specific CPU, not concurrency managed, and all queued works are |
306 | * executed immediately as long as max_active limit is not reached and | 302 | * executed immediately as long as max_active limit is not reached and |
@@ -308,16 +304,25 @@ enum { | |||
308 | * | 304 | * |
309 | * system_freezable_wq is equivalent to system_wq except that it's | 305 | * system_freezable_wq is equivalent to system_wq except that it's |
310 | * freezable. | 306 | * freezable. |
311 | * | ||
312 | * system_nrt_freezable_wq is equivalent to system_nrt_wq except that | ||
313 | * it's freezable. | ||
314 | */ | 307 | */ |
315 | extern struct workqueue_struct *system_wq; | 308 | extern struct workqueue_struct *system_wq; |
316 | extern struct workqueue_struct *system_long_wq; | 309 | extern struct workqueue_struct *system_long_wq; |
317 | extern struct workqueue_struct *system_nrt_wq; | ||
318 | extern struct workqueue_struct *system_unbound_wq; | 310 | extern struct workqueue_struct *system_unbound_wq; |
319 | extern struct workqueue_struct *system_freezable_wq; | 311 | extern struct workqueue_struct *system_freezable_wq; |
320 | extern struct workqueue_struct *system_nrt_freezable_wq; | 312 | |
313 | static inline struct workqueue_struct *__system_nrt_wq(void) | ||
314 | { | ||
315 | return system_wq; | ||
316 | } | ||
317 | |||
318 | static inline struct workqueue_struct *__system_nrt_freezable_wq(void) | ||
319 | { | ||
320 | return system_freezable_wq; | ||
321 | } | ||
322 | |||
323 | /* equivlalent to system_wq and system_freezable_wq, deprecated */ | ||
324 | #define system_nrt_wq __system_nrt_wq() | ||
325 | #define system_nrt_freezable_wq __system_nrt_freezable_wq() | ||
321 | 326 | ||
322 | extern struct workqueue_struct * | 327 | extern struct workqueue_struct * |
323 | __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, | 328 | __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, |