Date: Mon, 1 Feb 2021 13:55:55 +0000 From: Jessica Clarke <jrtc27@freebsd.org> To: Hans Petter Selasky <hps@selasky.org> Cc: Mateusz Guzik <mjg@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-branches@freebsd.org" <dev-commits-src-branches@FreeBSD.org> Subject: Re: git: fc301c224b27 - stable/13 - atomic: add stub atomic_load_consume_ptr Message-ID: <E51C75A1-D7EF-4D5E-98E9-7857AFDDB7AC@freebsd.org> In-Reply-To: <84f152e1-b1ed-b331-ab45-261dd3996903@selasky.org> References: <202102011240.111CeiX9094867@gitrepo.freebsd.org> <84f152e1-b1ed-b331-ab45-261dd3996903@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1 Feb 2021, at 13:53, Hans Petter Selasky <hps@selasky.org> wrote: > On 2/1/21 1:40 PM, Mateusz Guzik wrote: >> +/* >> + * Currently all architectures provide acquire and release fences on = their own, >> + * but they don't provide consume. Kludge below allows relevant code = to stop >> + * openly resorting to the stronger acquire fence, to be sorted out. >> + */ >> +#define atomic_load_consume_ptr(p) \ >> + ((__typeof(*p)) atomic_load_acq_ptr((uintptr_t *)p)) >> + >=20 > Are you missing: >=20 > CTASSERT(sizeof(*p) =3D=3D sizeof(void *)) ???? I also commented on the head commit that this is a waste of time and will likely never be anything other than an acquire, but never got a reply. Jess
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E51C75A1-D7EF-4D5E-98E9-7857AFDDB7AC>