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.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 5c158c477ac7..89a5a1231ffb 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -149,11 +149,11 @@ struct execute_work {
149 149
150extern struct workqueue_struct * 150extern struct workqueue_struct *
151__create_workqueue_key(const char *name, int singlethread, 151__create_workqueue_key(const char *name, int singlethread,
152 int freezeable, struct lock_class_key *key, 152 int freezeable, int rt, struct lock_class_key *key,
153 const char *lock_name); 153 const char *lock_name);
154 154
155#ifdef CONFIG_LOCKDEP 155#ifdef CONFIG_LOCKDEP
156#define __create_workqueue(name, singlethread, freezeable) \ 156#define __create_workqueue(name, singlethread, freezeable, rt) \
157({ \ 157({ \
158 static struct lock_class_key __key; \ 158 static struct lock_class_key __key; \
159 const char *__lock_name; \ 159 const char *__lock_name; \
@@ -164,17 +164,19 @@ __create_workqueue_key(const char *name, int singlethread,
164 __lock_name = #name; \ 164 __lock_name = #name; \
165 \ 165 \
166 __create_workqueue_key((name), (singlethread), \ 166 __create_workqueue_key((name), (singlethread), \
167 (freezeable), &__key, \ 167 (freezeable), (rt), &__key, \
168 __lock_name); \ 168 __lock_name); \
169}) 169})
170#else 170#else
171#define __create_workqueue(name, singlethread, freezeable) \ 171#define __create_workqueue(name, singlethread, freezeable, rt) \
172 __create_workqueue_key((name), (singlethread), (freezeable), NULL, NULL) 172 __create_workqueue_key((name), (singlethread), (freezeable), (rt), \
173 NULL, NULL)
173#endif 174#endif
174 175
175#define create_workqueue(name) __create_workqueue((name), 0, 0) 176#define create_workqueue(name) __create_workqueue((name), 0, 0, 0)
176#define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1) 177#define create_rt_workqueue(name) __create_workqueue((name), 0, 0, 1)
177#define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0) 178#define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1, 0)
179#define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0, 0)
178 180
179extern void destroy_workqueue(struct workqueue_struct *wq); 181extern void destroy_workqueue(struct workqueue_struct *wq);
180 182