diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-06 01:04:35 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-06 01:04:35 -0800 |
| commit | 5487472e4487e8650b72a41138eb3ce937f79e73 (patch) | |
| tree | bf4278b849867b43cd376857481b9b46d2c62022 /kernel | |
| parent | 0a19bba4d5f916904713b047141b5740466e4bb8 (diff) | |
| parent | bfa166fa144c919a7cc5c2836343d4091dfd54ff (diff) | |
Merge bk://gkernel.bkbits.net/net-drivers-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/timer.c | 2 | ||||
| -rw-r--r-- | kernel/workqueue.c | 24 |
2 files changed, 26 insertions, 0 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index f764f0c2334b..551436ffeb23 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -844,6 +844,8 @@ static unsigned long count_active_tasks(void) */ unsigned long avenrun[3]; +EXPORT_SYMBOL(avenrun); + /* * calc_load - given tick count, update the avenrun load estimates. * This is called while holding a write_lock on xtime_lock. diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 5301935f609b..52ef419d2747 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -423,6 +423,30 @@ void flush_scheduled_work(void) flush_workqueue(keventd_wq); } +/** + * cancel_rearming_delayed_workqueue - reliably kill off a delayed + * work whose handler rearms the delayed work. + * @wq: the controlling workqueue structure + * @work: the delayed work struct + */ +static void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, + struct work_struct *work) +{ + while (!cancel_delayed_work(work)) + flush_workqueue(wq); +} + +/** + * cancel_rearming_delayed_work - reliably kill off a delayed keventd + * work whose handler rearms the delayed work. + * @work: the delayed work struct + */ +void cancel_rearming_delayed_work(struct work_struct *work) +{ + cancel_rearming_delayed_workqueue(keventd_wq, work); +} +EXPORT_SYMBOL(cancel_rearming_delayed_work); + int keventd_up(void) { return keventd_wq != NULL; |
