From 772d939d19475d995bcd7dda6924f7d7a5bf3ae1 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 14 Feb 2011 11:54:45 -0500 Subject: [PATCH] Remove trace clock warning on non x86 systems Signed-off-by: Mathieu Desnoyers --- include/ust/clock.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/ust/clock.h b/include/ust/clock.h index 5e558f8..22d2efc 100644 --- a/include/ust/clock.h +++ b/include/ust/clock.h @@ -74,20 +74,24 @@ static __inline__ u64 trace_clock_read64(void) return retval; } - +#if __i386__ || __x86_64__ static __inline__ u64 trace_clock_frequency(void) { struct timespec ts; union lttng_timespec *lts = (union lttng_timespec *) &ts; -#if __i386__ || __x86_64__ if (likely(ust_clock_source == CLOCK_TRACE)) { clock_gettime(CLOCK_TRACE_FREQ, &ts); return lts->lttng_ts; } -#endif return 1000000000LL; } +#else /* #if __i386__ || __x86_64__ */ +static __inline__ u64 trace_clock_frequency(void) +{ + return 1000000000LL; +} +#endif /* #else #if __i386__ || __x86_64__ */ static __inline__ u32 trace_clock_freq_scale(void) { -- 2.34.1