diff options
| author | 2009-09-08 16:27:31 +0900 | |
|---|---|---|
| committer | 2009-09-08 16:27:31 +0900 | |
| commit | e7a963ef20cabde53d0e609737764ddc65f4605a (patch) | |
| tree | d2bf292f2dde9c6ee213d401abbbdc63fb3afa75 /include/linux/workqueue.h | |
| parent | sh: Kill off dcache writeback from copy_page(). (diff) | |
| parent | Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 (diff) | |
Merge branches 'sh/smp' and 'sh/stable-updates'
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() */ |
