diff options
author | Chris Hall (GMCH) <chris.hall@highwayman.com> | 2009-12-09 17:59:03 +0000 |
---|---|---|
committer | Chris Hall (GMCH) <chris.hall@highwayman.com> | 2009-12-09 17:59:03 +0000 |
commit | b3edb8b2b5d1e9c7b23bad9de6802e89c3a8fd0b (patch) | |
tree | 8f71c2d4efb98e8644c881c3d055ebf29b6ddb4c /lib/mqueue.h | |
parent | 482674bb1e9401fa4f954fb03cdc84ad9908845f (diff) | |
download | quagga-b3edb8b2b5d1e9c7b23bad9de6802e89c3a8fd0b.tar.bz2 quagga-b3edb8b2b5d1e9c7b23bad9de6802e89c3a8fd0b.tar.xz |
Ensure all timeouts are timeout times in qtime_mono_t.
Introduced separate types for qtime_mono_t and qtime_real_t, to
distinguish the time base of a given value.
Revised all users of timeouts so that they are all expressed as
qtime_mono_t values, so are all Quagga monotonic time based.
Revised qpt_cond_timedwait() so that all condition variables use the
same timebase (CLOCK_MONOTONIC if available, by default). Now all
timeout times are qtime_mono_t, and are converted to whatever the
condition variable is set to, if necessary.
Added explicit timeout to mqueue.
Fixed qps_pselect() to zeroise result vectors if no fds are
reported pending -- seems the O/S does not do this.
Diffstat (limited to 'lib/mqueue.h')
-rw-r--r-- | lib/mqueue.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/mqueue.h b/lib/mqueue.h index aff3e154..5c10911b 100644 --- a/lib/mqueue.h +++ b/lib/mqueue.h @@ -23,6 +23,7 @@ #define _ZEBRA_MQUEUE_H #include "qpthreads.h" +#include "qtime.h" /*============================================================================== */ @@ -76,9 +77,9 @@ enum mqueue_queue_type { #endif struct mqueue_queue_cond { - qpt_cond_t wait_here ; - qtime_t timeout ; - qtime_t interval ; + qpt_cond_t wait_here ; + qtime_mono_t timeout ; + qtime_t interval ; } ; struct mqueue_queue_signal { @@ -132,7 +133,7 @@ void mqueue_enqueue(mqueue_queue mq, mqueue_block mb, int priority) ; mqueue_block -mqueue_dequeue(mqueue_queue mq, int wait, mqueue_thread_signal mtsig) ; +mqueue_dequeue(mqueue_queue mq, int wait, void* arg) ; int mqueue_done_waiting(mqueue_queue mq, mqueue_thread_signal mtsig) ; |