diff options
| author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-09-23 03:49:27 +0400 |
|---|---|---|
| committer | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-09-23 03:49:27 +0400 |
| commit | f056878332a91ed984a116bad4e7d49aefff9e6e (patch) | |
| tree | 572f4757c8e7811d45e0be0c2ae529c78fb63441 /include/linux/workqueue.h | |
| parent | 3961f7c3cf247eee5df7fabadc7a40f2deeb98f3 (diff) | |
| parent | 7fa07729e439a6184bd824746d06a49cca553f15 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/power/wm97xx_battery.c
Diffstat (limited to 'include/linux/workqueue.h')
| -rw-r--r-- | include/linux/workqueue.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 13e1adf55c4c..7ef0c7b94f31 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -94,7 +94,7 @@ struct execute_work { /* * initialize all of a work item in one go * - * NOTE! No point in using "atomic_long_set()": useing a direct + * NOTE! No point in using "atomic_long_set()": using a direct * assignment of the work data initializer allows the compiler * to generate better code. */ @@ -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() */ |
