aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/timers/set-timer-lat.c
diff options
context:
space:
mode:
authorShuah Khan <skhan@linuxfoundation.org>2024-09-23 18:30:36 -0600
committerShuah Khan <skhan@linuxfoundation.org>2024-10-14 16:15:12 -0600
commit80fa614e2fbcf11069f0995e1601fb2e5702e2f4 (patch)
tree0a9b17dd003936401e0752fbe7f7159c32579cfe /tools/testing/selftests/timers/set-timer-lat.c
parent8e929cb546ee42c9a61d24fae60605e9e3192354 (diff)
selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines
Remove local NSEC_PER_SEC and USEC_PER_SEC defines. Pick them up from include/vdso/time64.h. This requires -I $(top_srcdir) to the timers Makefile to include the include/vdso/time64.h. posix_timers test names the defines NSECS_PER_SEC and USECS_PER_SEC. Change posix_timers test references to the defines to match the defines in the header file. Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Acked-by: John Stultz <jstultz@google.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/timers/set-timer-lat.c')
-rw-r--r--tools/testing/selftests/timers/set-timer-lat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/timers/set-timer-lat.c b/tools/testing/selftests/timers/set-timer-lat.c
index 7ce240c89b21..5365e9ae61c3 100644
--- a/tools/testing/selftests/timers/set-timer-lat.c
+++ b/tools/testing/selftests/timers/set-timer-lat.c
@@ -28,6 +28,7 @@
#include <signal.h>
#include <stdlib.h>
#include <pthread.h>
+#include <include/vdso/time64.h>
#include "../kselftest.h"
#define CLOCK_REALTIME 0
@@ -44,8 +45,6 @@
#define CLOCK_TAI 11
#define NR_CLOCKIDS 12
-
-#define NSEC_PER_SEC 1000000000ULL
#define UNRESONABLE_LATENCY 40000000 /* 40ms in nanosecs */
#define TIMER_SECS 1