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.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 0eae11fc7a23..01a050fc6650 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -18,7 +18,7 @@ struct workqueue_struct;
18 18
19struct work_struct; 19struct work_struct;
20typedef void (*work_func_t)(struct work_struct *work); 20typedef void (*work_func_t)(struct work_struct *work);
21void delayed_work_timer_fn(unsigned long __data); 21void delayed_work_timer_fn(struct timer_list *t);
22 22
23/* 23/*
24 * The first word is the work queue pointer and the flags rolled into 24 * The first word is the work queue pointer and the flags rolled into
@@ -176,8 +176,8 @@ struct execute_work {
176 176
177#define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \ 177#define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \
178 .work = __WORK_INITIALIZER((n).work, (f)), \ 178 .work = __WORK_INITIALIZER((n).work, (f)), \
179 .timer = __TIMER_INITIALIZER(delayed_work_timer_fn, \ 179 .timer = __TIMER_INITIALIZER((TIMER_FUNC_TYPE)delayed_work_timer_fn,\
180 0, (unsigned long)&(n), \ 180 (TIMER_DATA_TYPE)&(n.timer), \
181 (tflags) | TIMER_IRQSAFE), \ 181 (tflags) | TIMER_IRQSAFE), \
182 } 182 }
183 183
@@ -219,7 +219,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
219 \ 219 \
220 __init_work((_work), _onstack); \ 220 __init_work((_work), _onstack); \
221 (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ 221 (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
222 lockdep_init_map(&(_work)->lockdep_map, #_work, &__key, 0); \ 222 lockdep_init_map(&(_work)->lockdep_map, "(work_completion)"#_work, &__key, 0); \
223 INIT_LIST_HEAD(&(_work)->entry); \ 223 INIT_LIST_HEAD(&(_work)->entry); \
224 (_work)->func = (_func); \ 224 (_work)->func = (_func); \
225 } while (0) 225 } while (0)
@@ -242,8 +242,9 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
242#define __INIT_DELAYED_WORK(_work, _func, _tflags) \ 242#define __INIT_DELAYED_WORK(_work, _func, _tflags) \
243 do { \ 243 do { \
244 INIT_WORK(&(_work)->work, (_func)); \ 244 INIT_WORK(&(_work)->work, (_func)); \
245 __setup_timer(&(_work)->timer, delayed_work_timer_fn, \ 245 __setup_timer(&(_work)->timer, \
246 (unsigned long)(_work), \ 246 (TIMER_FUNC_TYPE)delayed_work_timer_fn, \
247 (TIMER_DATA_TYPE)&(_work)->timer, \
247 (_tflags) | TIMER_IRQSAFE); \ 248 (_tflags) | TIMER_IRQSAFE); \
248 } while (0) 249 } while (0)
249 250
@@ -251,8 +252,8 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
251 do { \ 252 do { \
252 INIT_WORK_ONSTACK(&(_work)->work, (_func)); \ 253 INIT_WORK_ONSTACK(&(_work)->work, (_func)); \
253 __setup_timer_on_stack(&(_work)->timer, \ 254 __setup_timer_on_stack(&(_work)->timer, \
254 delayed_work_timer_fn, \ 255 (TIMER_FUNC_TYPE)delayed_work_timer_fn,\
255 (unsigned long)(_work), \ 256 (TIMER_DATA_TYPE)&(_work)->timer,\
256 (_tflags) | TIMER_IRQSAFE); \ 257 (_tflags) | TIMER_IRQSAFE); \
257 } while (0) 258 } while (0)
258 259
@@ -399,7 +400,7 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active,
399 static struct lock_class_key __key; \ 400 static struct lock_class_key __key; \
400 const char *__lock_name; \ 401 const char *__lock_name; \
401 \ 402 \
402 __lock_name = #fmt#args; \ 403 __lock_name = "(wq_completion)"#fmt#args; \
403 \ 404 \
404 __alloc_workqueue_key((fmt), (flags), (max_active), \ 405 __alloc_workqueue_key((fmt), (flags), (max_active), \
405 &__key, __lock_name, ##args); \ 406 &__key, __lock_name, ##args); \