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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 3f363b7168c4..2ab0f9fae1d7 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -243,6 +243,21 @@ static inline int cancel_delayed_work(struct delayed_work *work)
243 return ret; 243 return ret;
244} 244}
245 245
246/*
247 * Like above, but uses del_timer() instead of del_timer_sync(). This means,
248 * if it returns 0 the timer function may be running and the queueing is in
249 * progress.
250 */
251static inline int __cancel_delayed_work(struct delayed_work *work)
252{
253 int ret;
254
255 ret = del_timer(&work->timer);
256 if (ret)
257 work_clear_pending(&work->work);
258 return ret;
259}
260
246extern int cancel_delayed_work_sync(struct delayed_work *work); 261extern int cancel_delayed_work_sync(struct delayed_work *work);
247 262
248/* Obsolete. use cancel_delayed_work_sync() */ 263/* Obsolete. use cancel_delayed_work_sync() */