summaryrefslogtreecommitdiffstats
path: root/lib/qpnexus.h
diff options
context:
space:
mode:
authorChris Hall <GMCH@hestia.halldom.com>2010-01-19 01:12:11 +0000
committerChris Hall <GMCH@hestia.halldom.com>2010-01-19 01:12:11 +0000
commit7fc51586dd130786b2cde348cf64967de12cf4f3 (patch)
tree8f59c922b727c41b9e4d74aae1df68971773c58a /lib/qpnexus.h
parentedc82cd294e7c4cfca309e08abede282456ca376 (diff)
parente0f9836737c9e91b8fa4c72b45d1fdc286e2d811 (diff)
downloadquagga-7fc51586dd130786b2cde348cf64967de12cf4f3.tar.bz2
quagga-7fc51586dd130786b2cde348cf64967de12cf4f3.tar.xz
Merge branch 'bgp_engine' of /git/quagga.euro-ix into bgp_engine
Diffstat (limited to 'lib/qpnexus.h')
-rw-r--r--lib/qpnexus.h12
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);
+
};
/*==============================================================================