lkml.org 
[lkml]   [2005]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch 008/198] re-export cancel_rearming_delayed_workqueue
From
Date

From: James Bottomley <James.Bottomley@SteelEye.com>

This was unexported by Arjan because we have no current users.

However, during a conversion from tasklets to workqueues of the parisc led
functions, we ran across a case where this was needed. In particular, the
open coded equivalent of cancel_rearming_delayed_workqueue was implemented
incorrectly, which is, I think, all the evidence necessary that this is a
useful API.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

25-akpm/include/linux/workqueue.h | 2 ++
25-akpm/kernel/workqueue.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)

diff -puN include/linux/workqueue.h~re-export-cancel_rearming_delayed_workqueue include/linux/workqueue.h
--- 25/include/linux/workqueue.h~re-export-cancel_rearming_delayed_workqueue 2005-04-12 03:21:05.391317296 -0700
+++ 25-akpm/include/linux/workqueue.h 2005-04-12 03:21:05.396316536 -0700
@@ -71,6 +71,8 @@ extern int keventd_up(void);

extern void init_workqueues(void);
void cancel_rearming_delayed_work(struct work_struct *work);
+void cancel_rearming_delayed_workqueue(struct workqueue_struct *,
+ struct work_struct *);

/*
* Kill off a pending schedule_delayed_work(). Note that the work callback
diff -puN kernel/workqueue.c~re-export-cancel_rearming_delayed_workqueue kernel/workqueue.c
--- 25/kernel/workqueue.c~re-export-cancel_rearming_delayed_workqueue 2005-04-12 03:21:05.392317144 -0700
+++ 25-akpm/kernel/workqueue.c 2005-04-12 03:21:05.397316384 -0700
@@ -429,12 +429,13 @@ void flush_scheduled_work(void)
* @wq: the controlling workqueue structure
* @work: the delayed work struct
*/
-static void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
- struct work_struct *work)
+void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
+ struct work_struct *work)
{
while (!cancel_delayed_work(work))
flush_workqueue(wq);
}
+EXPORT_SYMBOL(cancel_rearming_delayed_workqueue);

/**
* cancel_rearming_delayed_work - reliably kill off a delayed keventd
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-04-12 12:36    [W:3.093 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site