From b3edb8b2b5d1e9c7b23bad9de6802e89c3a8fd0b Mon Sep 17 00:00:00 2001 From: "Chris Hall (GMCH)" Date: Wed, 9 Dec 2009 17:59:03 +0000 Subject: 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. --- lib/vty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/vty.c') diff --git a/lib/vty.c b/lib/vty.c index 782575a6..6a307c6b 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -2996,7 +2996,7 @@ vty_event_r (enum event event, int sock, struct vty *vty) /* Time out treatment. */ if (vty->v_timeout) { - qtimer_set(vty->qtr, qtimer_time_future(QTIME(vty->v_timeout)), NULL) ; + qtimer_set(vty->qtr, qt_add_monotonic(QTIME(vty->v_timeout)), NULL) ; } break; case VTY_WRITE: @@ -3005,7 +3005,7 @@ vty_event_r (enum event event, int sock, struct vty *vty) case VTY_TIMEOUT_RESET: if (vty->v_timeout) { - qtimer_set(vty->qtr, qtimer_time_future(QTIME(vty->v_timeout)), NULL) ; + qtimer_set(vty->qtr, qt_add_monotonic(QTIME(vty->v_timeout)), NULL) ; } else { -- cgit v1.2.3