aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2024-05-22 05:36:29 +0000
committerKyle Evans <kevans@FreeBSD.org>2024-05-22 05:37:41 +0000
commit6e824f3713011f7955a4f88fb16445e8e2cbe72c (patch)
treecd324378067baceaa6fc7dd86f65539415e58600
parent61e3e1776d400c72cbdc521212bf932ed11be507 (diff)
time: siginfo_recvd needs to be marked volatile
sig_atomic_t does not imply volatility, we must do it ourselves to avoid caching of siginfo_recvd loads. Sponsored by: Klara, Inc.
-rw-r--r--usr.bin/time/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c
index 92148ab2e35b..4c1ce06543e3 100644
--- a/usr.bin/time/time.c
+++ b/usr.bin/time/time.c
@@ -54,7 +54,7 @@ static void showtime(FILE *, struct timespec *, struct timespec *,
static void siginfo(int);
static void usage(void) __dead2;
-static sig_atomic_t siginfo_recvd;
+static volatile sig_atomic_t siginfo_recvd;
static char decimal_point;
static struct timespec before_ts;
static int hflag, pflag;