Re: [lttng-dev] [PATCH v2 05/12] urcu/uatomic: Add CMM memory model

Olivier Dion via lttng-dev <[email protected]>
Newsgroups org.lttng.lists.lttng-dev
Organization EfficiOS
Message-ID <87bkgyjjsz.fsf@laura>
On Wed, 21 Jun 2023, "Paul E. McKenney" <[email protected]> wrote:
> On Wed, Jun 07, 2023 at 02:53:52PM -0400, Olivier Dion wrote:
>> -#ifdef __URCU_DEREFERENCE_USE_ATOMIC_CONSUME
>> -# define _rcu_dereference(p) __extension__ ({						\
>> -				__typeof__(__extension__ ({				\
>> -					__typeof__(p) __attribute__((unused)) _________p0 = { 0 }; \
>> -					_________p0;					\
>> -				})) _________p1;					\
>> -				__atomic_load(&(p), &_________p1, __ATOMIC_CONSUME);	\
>
> There is talk of getting rid of memory_order_consume.  But for the moment,
> it is what there is.  Another alternative is to use a volatile load,
> similar to old-style CMM_LOAD_SHARED() or in-kernel READ_ONCE().

I think we can stick to __ATOMIC_CONSUME for now.  Hopefully getting rid
of it means it will be an alias for __ATOMIC_ACQUIRE for ever.

-- 
Olivier Dion
EfficiOS Inc.
https://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.