diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-19 17:58:10 -0700 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-19 17:58:10 -0700 |
| commit | 50596be0d5ff65c79060bcd858cda33a974a0dc1 (patch) | |
| tree | 4c5532f9924f9afc47af95d3cdfa7141e4e901c9 /lib/workqueue.h | |
| parent | 5000f21c25dd13d12c3a00b5e702d6f79685a77e (diff) | |
Some small enhancements to thread and workqueue libraries in zebra:
- Allow work queues to specify the yield duration for corresponding background thread
- Support using specified yield duration in thread yielding
- During work queue processing, if using a single list element with a meta-queue
(like done in Zebra), do not exit after each element is processed, instead
update the next-node upon a WQ_REQUEUE so that the WQ processing continues
and is terminated by the yield logic.
- Enhance work queue debug output
Diffstat (limited to 'lib/workqueue.h')
| -rw-r--r-- | lib/workqueue.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/workqueue.h b/lib/workqueue.h index f59499a0a7..7d9a877d10 100644 --- a/lib/workqueue.h +++ b/lib/workqueue.h @@ -84,11 +84,14 @@ struct work_queue unsigned int max_retries; unsigned int hold; /* hold time for first run, in ms */ + + unsigned long yield; /* yield time in us for associated thread */ } spec; /* remaining fields should be opaque to users */ struct list *items; /* queue item list */ unsigned long runs; /* runs count */ + unsigned long yields; /* yields count */ struct { unsigned int best; |
