diff options
author | paulo <paul@bayleaf.org.uk> | 2010-02-02 12:02:31 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2010-02-02 12:02:31 +0000 |
commit | 2e009f2f26b0a00ad86dddca933bc51a9bb53858 (patch) | |
tree | 615ac6539338dfac6fc884ec58f4cea25d24d46b /lib/qpnexus.h | |
parent | 3539f06bfcc040cfd42833a5a91e85999930ea1e (diff) | |
download | quagga-2e009f2f26b0a00ad86dddca933bc51a9bb53858.tar.bz2 quagga-2e009f2f26b0a00ad86dddca933bc51a9bb53858.tar.xz |
Change nexus priorities to more closely resemble the originals.
Diffstat (limited to 'lib/qpnexus.h')
-rw-r--r-- | lib/qpnexus.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/qpnexus.h b/lib/qpnexus.h index 32219df1..a6cad148 100644 --- a/lib/qpnexus.h +++ b/lib/qpnexus.h @@ -56,6 +56,19 @@ /* number of event hooks */ #define NUM_EVENT_HOOK 2 +/* Work priorities */ +enum qpn_priority +{ + qpn_pri_highest = 1, + + qpn_pri_first = 1, + qpn_pri_second = 2, + qpn_pri_third = 3, + qpn_pri_fourth = 4, + + qpn_pri_lowest = 4, +}; + /*============================================================================== * Data Structures. */ @@ -95,11 +108,12 @@ struct qpn_nexus * thread loop is no longer executed */ void (*in_thread_final)(void); - /* thread loop events, can override. Called before message queue, - * I/O and timers. + /* thread loop events, can override. Called before and after message queue, + * and before I/O and timers. + * Hook should perform all work <= given priority. * Returns the time to try again, 0 means default to maximum. */ - qtime_mono_t (*event_hook[NUM_EVENT_HOOK])(void); + qtime_mono_t (*event_hook[NUM_EVENT_HOOK])(enum qpn_priority); }; |