aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/workqueue.h')
-rw-r--r--include/linux/workqueue.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 07cf5e5f91cb..b8f4ec45c40a 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -226,6 +226,7 @@ enum {
226 WQ_FREEZEABLE = 1 << 0, /* freeze during suspend */ 226 WQ_FREEZEABLE = 1 << 0, /* freeze during suspend */
227 WQ_SINGLE_CPU = 1 << 1, /* only single cpu at a time */ 227 WQ_SINGLE_CPU = 1 << 1, /* only single cpu at a time */
228 WQ_NON_REENTRANT = 1 << 2, /* guarantee non-reentrance */ 228 WQ_NON_REENTRANT = 1 << 2, /* guarantee non-reentrance */
229 WQ_RESCUER = 1 << 3, /* has an rescue worker */
229}; 230};
230 231
231extern struct workqueue_struct * 232extern struct workqueue_struct *
@@ -252,11 +253,12 @@ __create_workqueue_key(const char *name, unsigned int flags, int max_active,
252#endif 253#endif
253 254
254#define create_workqueue(name) \ 255#define create_workqueue(name) \
255 __create_workqueue((name), 0, 1) 256 __create_workqueue((name), WQ_RESCUER, 1)
256#define create_freezeable_workqueue(name) \ 257#define create_freezeable_workqueue(name) \
257 __create_workqueue((name), WQ_FREEZEABLE | WQ_SINGLE_CPU, 1) 258 __create_workqueue((name), \
259 WQ_FREEZEABLE | WQ_SINGLE_CPU | WQ_RESCUER, 1)
258#define create_singlethread_workqueue(name) \ 260#define create_singlethread_workqueue(name) \
259 __create_workqueue((name), WQ_SINGLE_CPU, 1) 261 __create_workqueue((name), WQ_SINGLE_CPU | WQ_RESCUER, 1)
260 262
261extern void destroy_workqueue(struct workqueue_struct *wq); 263extern void destroy_workqueue(struct workqueue_struct *wq);
262 264