summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.davemloft.net>2005-03-05 04:43:56 -0800
committerDavid S. Miller <davem@nuts.davemloft.net>2005-03-05 04:43:56 -0800
commit4f96d0aab57dc838146cd5a05ae6dfdd5c81d03c (patch)
treeadd05426a52c1e2af04228f8727250bd4bff8cb1 /kernel
parent4ae7de515fbdefb5e6ef32836a1fef47a4420f65 (diff)
parenta1b4c3d46cd400a0ee45080f2ea1a959a53018e3 (diff)
Merge nuts.davemloft.net:/disk1/BK/net-2.6.12
into nuts.davemloft.net:/disk1/BK/net-2.6
Diffstat (limited to 'kernel')
-rw-r--r--kernel/timer.c2
-rw-r--r--kernel/workqueue.c24
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;