summaryrefslogtreecommitdiff
path: root/lib/workqueue.h
diff options
context:
space:
mode:
authorpaul <paul>2006-02-02 17:50:19 +0000
committerpaul <paul>2006-02-02 17:50:19 +0000
commit306d8890439cdb9128d063ee2f77700a11e6843c (patch)
treefa5c8e035891cc83e9f5cfa80343df4bcac40fb7 /lib/workqueue.h
parent3a570c8b7b56b5a3042fbc035a01c753440b927c (diff)
[lib/workqueue] remove the useless 'delay' factor.
2006-02-02 Paul Jakma <paul.jakma@sun.com> * workqueue.h: (struct work_queue) Remove the delay field. It served no purpose and just introduced bad behaviour. Should be excised before its allowed to escape into 1.0. This removes need for the 'flood' and runs_since_clear fields. * workqueue.c: (general) excise delay factor between queue runs, hence the 'flood' crap too.. See above. * bgp_route.c: (bgp_{clear_node,process}_queue_init) delay field is removed from workqueue spec.
Diffstat (limited to 'lib/workqueue.h')
-rw-r--r--lib/workqueue.h20
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/workqueue.h b/lib/workqueue.h
index 0a398ded..c06f481f 100644
--- a/lib/workqueue.h
+++ b/lib/workqueue.h
@@ -24,10 +24,8 @@
#ifndef _QUAGGA_WORK_QUEUE_H
#define _QUAGGA_WORK_QUEUE_H
-/* Work queue default hold and cycle times - millisec */
-#define WORK_QUEUE_DEFAULT_HOLD 50 /* hold-time between runs of a queue */
-#define WORK_QUEUE_DEFAULT_DELAY 10 /* minimum delay for queue runs */
-#define WORK_QUEUE_DEFAULT_FLOOD 40 /* flood factor, ~2s with prev values */
+/* Hold time for the initial schedule of a queue run, in millisec */
+#define WORK_QUEUE_DEFAULT_HOLD 50
/* action value, for use by item processor and item error handlers */
typedef enum
@@ -90,25 +88,11 @@ struct work_queue
unsigned int max_retries;
unsigned int hold; /* hold time for first run, in ms */
- unsigned int delay; /* min delay between queue runs, in ms */
-
- unsigned int flood; /* number of queue runs after which we consider
- * queue to be flooded, where the runs are
- * consecutive and each has used its full slot,
- * and the queue has still not been cleared. If
- * the queue is flooded, then we try harder to
- * clear it by ignoring the hold and delay
- * times. No point sparing CPU resources just
- * to use ever more memory resources.
- */
} spec;
/* remaining fields should be opaque to users */
struct list *items; /* queue item list */
unsigned long runs; /* runs count */
- unsigned int runs_since_clear; /* number of runs since queue was
- * last cleared
- */
struct {
unsigned int best;