From df125a61b8365b96819ca3a8ace5bc6f35f958b5 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 18 Nov 2022 12:30:39 -0500 Subject: [PATCH] Drop 'wrapper/time.h' wrapper Change-Id: I15ae7f5436e5fc2dfa2b0f9b878810a07fe8a5e9 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- include/wrapper/time.h | 22 ---------------------- src/lttng-events.c | 9 --------- 2 files changed, 31 deletions(-) delete mode 100644 include/wrapper/time.h diff --git a/include/wrapper/time.h b/include/wrapper/time.h deleted file mode 100644 index ad424dcf..00000000 --- a/include/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 (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0)) -# define LTTNG_KERNEL_HAS_TIMESPEC64 -#endif - -#endif /* _LTTNG_WRAPPER_TIME_H */ diff --git a/src/lttng-events.c b/src/lttng-events.c index 472440e1..431da540 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -46,7 +46,6 @@ #include #include #include -#include #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0)) #include @@ -3688,20 +3687,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); -- 2.34.1