Date: Mon, 1 Feb 2021 14:53:22 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Mateusz Guzik <mjg@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: fc301c224b27 - stable/13 - atomic: add stub atomic_load_consume_ptr Message-ID: <84f152e1-b1ed-b331-ab45-261dd3996903@selasky.org> In-Reply-To: <202102011240.111CeiX9094867@gitrepo.freebsd.org> References: <202102011240.111CeiX9094867@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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)) > + Are you missing: CTASSERT(sizeof(*p) == sizeof(void *)) ???? --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84f152e1-b1ed-b331-ab45-261dd3996903>