diff options
| author | Len Brown <len.brown@intel.com> | 2009-09-19 00:06:59 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2009-09-19 00:06:59 -0400 |
| commit | 71fd68e7d234f6b7d8407c8f486764d24f8411f4 (patch) | |
| tree | 6dc2a4c356b4f454fc85d0c7cb019986f6f4993b /include/linux/workqueue.h | |
| parent | 8ff0e082f0833d32c7523a6cd72b6cf6a2142ce8 (diff) | |
| parent | 78f28b7c555359c67c2a0d23f7436e915329421e (diff) | |
Merge branch 'linus' into release
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) return ret; } +/* + * Like above, but uses del_timer() instead of del_timer_sync(). This means, + * if it returns 0 the timer function may be running and the queueing is in + * progress. + */ +static inline int __cancel_delayed_work(struct delayed_work *work) +{ + int ret; + + ret = del_timer(&work->timer); + if (ret) + work_clear_pending(&work->work); + return ret; +} + extern int cancel_delayed_work_sync(struct delayed_work *work); /* Obsolete. use cancel_delayed_work_sync() */ |
