git: fc301c224b27 - stable/13 - atomic: add stub atomic_load_consume_ptr
Jessica Clarke
jrtc27 at freebsd.org
Mon Feb 1 13:56:00 UTC 2021
On 1 Feb 2021, at 13:53, Hans Petter Selasky <hps at 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))
>> +
>
> Are you missing:
>
> CTASSERT(sizeof(*p) == 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
More information about the dev-commits-src-all
mailing list