From 6ce80bdb2523ad82cef813f6d8a7e0d4daa8cfae Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Mon, 12 Nov 2007 14:55:01 +0000 Subject: + fixed bug #418 (changing address on an existing interface doesn't cause existing static routes to be revalidated) --- lib/workqueue.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/workqueue.h') 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 *); -- cgit v1.2.3