From: Mathieu Desnoyers Date: Mon, 13 Apr 2020 16:32:17 +0000 (-0400) Subject: wrapper: remove time.h wrapper X-Git-Tag: for-upstreaming-review-1~99 X-Git-Url: http://git.liburcu.org/?p=lttng-modules.git;a=commitdiff_plain;h=a230fd6d07ab3c99a385f5b17ef0bfe055f47653 wrapper: remove time.h wrapper --- diff --git a/lttng-events.c b/lttng-events.c index aa0f2e2a..61439ec7 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -42,7 +42,6 @@ #include #include #include -#include #define METADATA_CACHE_DEFAULT_SIZE 4096 @@ -2511,20 +2510,12 @@ int64_t measure_clock_offset(void) uint64_t tcf = trace_clock_freq(); int64_t offset; unsigned long flags; -#ifdef LTTNG_KERNEL_HAS_TIMESPEC64 struct timespec64 rts = { 0, 0 }; -#else - struct timespec rts = { 0, 0 }; -#endif /* Disable interrupts to increase correlation precision. */ local_irq_save(flags); monotonic[0] = trace_clock_read64(); -#ifdef LTTNG_KERNEL_HAS_TIMESPEC64 ktime_get_real_ts64(&rts); -#else - getnstimeofday(&rts); -#endif monotonic[1] = trace_clock_read64(); local_irq_restore(flags); diff --git a/wrapper/time.h b/wrapper/time.h deleted file mode 100644 index 60ce78c9..00000000 --- a/wrapper/time.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) - * - * wrapper/time.h - * - * Copyright (C) 2020 Michael Jeanson - * Copyright (C) 2020 Mathieu Desnoyers - */ - -#ifndef _LTTNG_WRAPPER_TIME_H -#define _LTTNG_WRAPPER_TIME_H - -#include - -/* - * Use 64bit timespec on kernels that have it, this makes 32bit arch - * y2038 compliant. - */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) -# define LTTNG_KERNEL_HAS_TIMESPEC64 -#endif - -#endif /* _LTTNG_WRAPPER_TIME_H */