Date: Fri, 31 May 2024 22:52:02 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Kyle Evans <kevans@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6e824f371301 - main - time: siginfo_recvd needs to be marked volatile Message-ID: <ZloqYlL6gBDPfAvP@kib.kiev.ua> In-Reply-To: <202405220537.44M5bugu007292@gitrepo.freebsd.org> References: <202405220537.44M5bugu007292@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 22, 2024 at 05:37:56AM +0000, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6e824f3713011f7955a4f88fb16445e8e2cbe72c > > commit 6e824f3713011f7955a4f88fb16445e8e2cbe72c > Author: Kyle Evans <kevans@FreeBSD.org> > AuthorDate: 2024-05-22 05:36:29 +0000 > Commit: Kyle Evans <kevans@FreeBSD.org> > CommitDate: 2024-05-22 05:37:41 +0000 > > time: siginfo_recvd needs to be marked volatile I do not think so. It happens to work with the compilers we currently use. > > sig_atomic_t does not imply volatility, we must do it ourselves to avoid > caching of siginfo_recvd loads. For this purpose, standard provides atomic_signal_fence(). You would need to put it before read of siginfo_recvd (after wait4()), and after update of siginfo_recvd in the signal handler.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZloqYlL6gBDPfAvP>