diff options
author | paulo <paul@bayleaf.org.uk> | 2010-01-18 18:00:34 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2010-01-18 18:00:34 +0000 |
commit | 8f62c98f904833033bd4684fa3ae6b516470da75 (patch) | |
tree | 75f698ea0fc9ccc0624434e3b25df3d4a0091acf /lib/qpnexus.h | |
parent | ea3df74b49782790ba198b744cbe22330377fba4 (diff) | |
download | quagga-8f62c98f904833033bd4684fa3ae6b516470da75.tar.bz2 quagga-8f62c98f904833033bd4684fa3ae6b516470da75.tar.xz |
Nexus to handle old threads and process the bgp local events. Deals
with having 1 or multiple nexus (and pthreads).
Diffstat (limited to 'lib/qpnexus.h')
-rw-r--r-- | lib/qpnexus.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/qpnexus.h b/lib/qpnexus.h index c717ed23..32219df1 100644 --- a/lib/qpnexus.h +++ b/lib/qpnexus.h @@ -53,6 +53,9 @@ /* signal for message queues */ #define SIGMQUEUE SIGUSR2 +/* number of event hooks */ +#define NUM_EVENT_HOOK 2 + /*============================================================================== * Data Structures. */ @@ -80,9 +83,6 @@ struct qpn_nexus mqueue_queue queue; mqueue_thread_signal mts; - /* legacy threads */ - struct thread_master *master; - /* qpthread routine, can override */ void* (*start)(void*); @@ -95,6 +95,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. + * Returns the time to try again, 0 means default to maximum. + */ + qtime_mono_t (*event_hook[NUM_EVENT_HOOK])(void); + }; /*============================================================================== |