git: fc301c224b27 - stable/13 - atomic: add stub atomic_load_consume_ptr

Hans Petter Selasky hps at selasky.org
Mon Feb 1 13:53:36 UTC 2021


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


More information about the dev-commits-src-branches mailing list