diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2009-09-08 03:27:31 -0400 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2009-09-08 03:27:31 -0400 |
| commit | e7a963ef20cabde53d0e609737764ddc65f4605a (patch) | |
| tree | d2bf292f2dde9c6ee213d401abbbdc63fb3afa75 /include/linux/workqueue.h | |
| parent | a2494b9b5fb702becaf8d8e3138f7a1a0d3c537e (diff) | |
| parent | 3ff323f89075624b6891e7c428edb8e8a35be13c (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) | |||
| 240 | return ret; | 240 | return ret; |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | /* | ||
| 244 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, | ||
| 245 | * if it returns 0 the timer function may be running and the queueing is in | ||
| 246 | * progress. | ||
| 247 | */ | ||
| 248 | static inline int __cancel_delayed_work(struct delayed_work *work) | ||
| 249 | { | ||
| 250 | int ret; | ||
| 251 | |||
| 252 | ret = del_timer(&work->timer); | ||
| 253 | if (ret) | ||
| 254 | work_clear_pending(&work->work); | ||
| 255 | return ret; | ||
| 256 | } | ||
| 257 | |||
| 243 | extern int cancel_delayed_work_sync(struct delayed_work *work); | 258 | extern int cancel_delayed_work_sync(struct delayed_work *work); |
| 244 | 259 | ||
| 245 | /* Obsolete. use cancel_delayed_work_sync() */ | 260 | /* Obsolete. use cancel_delayed_work_sync() */ |
