summaryrefslogtreecommitdiff
path: root/lib/workqueue.h
diff options
context:
space:
mode:
authorDenis Ovsienko <linux@pilot.org.ua>2007-11-12 14:55:01 +0000
committerDenis Ovsienko <linux@pilot.org.ua>2007-11-12 14:55:01 +0000
commit6ce80bdb2523ad82cef813f6d8a7e0d4daa8cfae (patch)
treed0b0fc8725c9f120cdcc16fa7f711d8104051815 /lib/workqueue.h
parent3a02d1f7fb778a1ea4f45d037f13dfcd126e2337 (diff)
+ fixed bug #418 (changing address on an existing interface doesn't cause existing static routes to be revalidated)
Diffstat (limited to 'lib/workqueue.h')
-rw-r--r--lib/workqueue.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/workqueue.h b/lib/workqueue.h
index 7e0e78ab..3150c32e 100644
--- a/lib/workqueue.h
+++ b/lib/workqueue.h
@@ -47,11 +47,8 @@ struct work_queue_item
unsigned short ran; /* # of times item has been run */
};
-enum work_queue_flags
-{
- WQ_UNPLUGGED = 0,
- WQ_PLUGGED = 1,
-};
+#define WQ_UNPLUGGED (1 << 0) /* available for draining */
+#define WQ_AIM_HEAD (1 << 1) /* add new items before list head, not after tail */
struct work_queue
{
@@ -101,7 +98,7 @@ struct work_queue
} cycles; /* cycle counts */
/* private state */
- enum work_queue_flags flags; /* user set flag */
+ u_int16_t flags; /* user set flag */
};
/* User API */
@@ -122,6 +119,8 @@ extern void work_queue_add (struct work_queue *, void *);
extern void work_queue_plug (struct work_queue *wq);
/* unplug the queue, allow it to be drained again */
extern void work_queue_unplug (struct work_queue *wq);
+/* control the value for WQ_AIM_HEAD flag */
+extern void work_queue_aim_head (struct work_queue *wq, const unsigned);
/* Helpers, exported for thread.c and command.c */
extern int work_queue_run (struct thread *);