Drop 'wrapper/time.h' wrapper
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 18 Nov 2022 17:30:39 +0000 (12:30 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 23 Nov 2022 20:02:44 +0000 (15:02 -0500)
Change-Id: I15ae7f5436e5fc2dfa2b0f9b878810a07fe8a5e9
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/wrapper/time.h [deleted file]
src/lttng-events.c

diff --git a/include/wrapper/time.h b/include/wrapper/time.h
deleted file mode 100644 (file)
index ad424dc..0000000
+++ /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 <mjeanson@efficios.com>
- * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_WRAPPER_TIME_H
-#define _LTTNG_WRAPPER_TIME_H
-
-#include <lttng/kernel-version.h>
-
-/*
- * 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 */
index 472440e1770e4ca40000d5ed7c3dd9f219d60727..431da540108430108c618390f9c216bf87567748 100644 (file)
@@ -46,7 +46,6 @@
 #include <lttng/utils.h>
 #include <ringbuffer/backend.h>
 #include <ringbuffer/frontend.h>
-#include <wrapper/time.h>
 
 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0))
 #include <linux/stdarg.h>
@@ -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);
 
This page took 0.026731 seconds and 4 git commands to generate.