From 2c6a998727bc5e322a58593f64bdffa2cd21999c Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 8 Oct 2021 11:38:30 +0200 Subject: [PATCH] CLEANUP: clock: stop exporting before_poll and after_poll We don't need to export them anymore so let's make them static. --- include/haproxy/clock.h | 2 -- src/clock.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/haproxy/clock.h b/include/haproxy/clock.h index 448b0c8d0..73d4ef37c 100644 --- a/include/haproxy/clock.h +++ b/include/haproxy/clock.h @@ -31,8 +31,6 @@ extern volatile ullong global_now; /* common monotonic date betwe extern THREAD_LOCAL struct timeval now; /* internal monotonic date derived from real clock */ extern THREAD_LOCAL struct timeval date; /* the real current date (wall-clock time) */ -extern THREAD_LOCAL struct timeval before_poll; /* system date before calling poll() */ -extern THREAD_LOCAL struct timeval after_poll; /* system date after leaving poll() */ uint64_t now_cpu_time_thread(const struct thread_info *thr); uint64_t now_mono_time(void); diff --git a/src/clock.c b/src/clock.c index cd5ead7b4..ccb59c3cb 100644 --- a/src/clock.c +++ b/src/clock.c @@ -29,9 +29,9 @@ THREAD_ALIGNED(64) static ullong now_offset; /* global offset between syste THREAD_LOCAL uint now_ms; /* internal monotonic date in milliseconds (may wrap) */ THREAD_LOCAL struct timeval now; /* internal monotonic date derived from real clock */ THREAD_LOCAL struct timeval date; /* the real current date (wall-clock time) */ -THREAD_LOCAL struct timeval before_poll; /* system date before calling poll() */ -THREAD_LOCAL struct timeval after_poll; /* system date after leaving poll() */ +static THREAD_LOCAL struct timeval before_poll; /* system date before calling poll() */ +static THREAD_LOCAL struct timeval after_poll; /* system date after leaving poll() */ static THREAD_LOCAL unsigned int samp_time; /* total elapsed time over current sample */ static THREAD_LOCAL unsigned int idle_time; /* total idle time over current sample */ static THREAD_LOCAL unsigned int iso_time_sec; /* last iso time value for this thread */