diff options
Diffstat (limited to 'include/linux/workqueue.h')
-rw-r--r-- | include/linux/workqueue.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 0c0771f06bfa..1ac11586a2f5 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -127,12 +127,20 @@ struct execute_work { | |||
127 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ | 127 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ |
128 | } | 128 | } |
129 | 129 | ||
130 | #define __DEFERRED_WORK_INITIALIZER(n, f) { \ | ||
131 | .work = __WORK_INITIALIZER((n).work, (f)), \ | ||
132 | .timer = TIMER_DEFERRED_INITIALIZER(NULL, 0, 0), \ | ||
133 | } | ||
134 | |||
130 | #define DECLARE_WORK(n, f) \ | 135 | #define DECLARE_WORK(n, f) \ |
131 | struct work_struct n = __WORK_INITIALIZER(n, f) | 136 | struct work_struct n = __WORK_INITIALIZER(n, f) |
132 | 137 | ||
133 | #define DECLARE_DELAYED_WORK(n, f) \ | 138 | #define DECLARE_DELAYED_WORK(n, f) \ |
134 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) | 139 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) |
135 | 140 | ||
141 | #define DECLARE_DEFERRED_WORK(n, f) \ | ||
142 | struct delayed_work n = __DEFERRED_WORK_INITIALIZER(n, f) | ||
143 | |||
136 | /* | 144 | /* |
137 | * initialize a work item's function pointer | 145 | * initialize a work item's function pointer |
138 | */ | 146 | */ |
@@ -401,7 +409,7 @@ static inline bool __cancel_delayed_work(struct delayed_work *work) | |||
401 | } | 409 | } |
402 | 410 | ||
403 | /* Obsolete. use cancel_delayed_work_sync() */ | 411 | /* Obsolete. use cancel_delayed_work_sync() */ |
404 | static inline | 412 | static inline __deprecated |
405 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | 413 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, |
406 | struct delayed_work *work) | 414 | struct delayed_work *work) |
407 | { | 415 | { |
@@ -409,7 +417,7 @@ void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | |||
409 | } | 417 | } |
410 | 418 | ||
411 | /* Obsolete. use cancel_delayed_work_sync() */ | 419 | /* Obsolete. use cancel_delayed_work_sync() */ |
412 | static inline | 420 | static inline __deprecated |
413 | void cancel_rearming_delayed_work(struct delayed_work *work) | 421 | void cancel_rearming_delayed_work(struct delayed_work *work) |
414 | { | 422 | { |
415 | cancel_delayed_work_sync(work); | 423 | cancel_delayed_work_sync(work); |