diff options
Diffstat (limited to 'include/linux/workqueue.h')
| -rw-r--r-- | include/linux/workqueue.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 13e1adf55c4c..6273fa97b527 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -240,6 +240,21 @@ static inline int cancel_delayed_work(struct delayed_work *work) | |||
| 240 | return ret; | 240 | return ret; |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | /* | ||
| 244 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, | ||
| 245 | * if it returns 0 the timer function may be running and the queueing is in | ||
| 246 | * progress. | ||
| 247 | */ | ||
| 248 | static inline int __cancel_delayed_work(struct delayed_work *work) | ||
| 249 | { | ||
| 250 | int ret; | ||
| 251 | |||
| 252 | ret = del_timer(&work->timer); | ||
| 253 | if (ret) | ||
| 254 | work_clear_pending(&work->work); | ||
| 255 | return ret; | ||
| 256 | } | ||
| 257 | |||
| 243 | extern int cancel_delayed_work_sync(struct delayed_work *work); | 258 | extern int cancel_delayed_work_sync(struct delayed_work *work); |
| 244 | 259 | ||
| 245 | /* Obsolete. use cancel_delayed_work_sync() */ | 260 | /* Obsolete. use cancel_delayed_work_sync() */ |
