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/qtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/qtime.c') diff --git a/lib/qtime.c b/lib/qtime.c index 2e881be3..3ec34a72 100644 --- a/lib/qtime.c +++ b/lib/qtime.c @@ -109,7 +109,7 @@ static int64_t times_clk_tcks = 0 ; /* sysconf(_SC_CLK_TCK) */ static qtime_t times_scale_q = 0 ; /* 10**9 / times_clk_tcks */ static qtime_t times_scale_r = 0 ; /* 10**9 % times_clk_tcks */ -qtime_t +qtime_mono_t qt_craft_monotonic(void) { struct tms dummy ; int64_t this_times_sample ; -- cgit v1.2.3