diff options
| author | David S. Miller <davem@davemloft.net> | 2009-09-11 20:35:13 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-09-11 20:35:13 -0700 |
| commit | cabc5c0f7fa1342049042d6e147db5a73773955b (patch) | |
| tree | 2be09ae1777d580c7dfe05d6d5b76e57281ec447 /include/linux/workqueue.h | |
| parent | b73d884756303316ead4cd7dad51236b2a515a1a (diff) | |
| parent | 86d710146fb9975f04c505ec78caa43d227c1018 (diff) | |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
arch/sparc/Kconfig
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() */ |
