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.
This commit is contained in:
Kyle Evans 2024-05-22 00:36:29 -05:00
parent 61e3e1776d
commit 6e824f3713

View file

@ -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;