[lttng-dev] [PATCH 02/11] urcu/uatomic: Use atomic builtins if configured

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Jun 29 14:33:45 EDT 2023


On 6/29/23 13:27, Olivier Dion wrote:
> On Thu, 29 Jun 2023, Olivier Dion <odion at efficios.com> wrote:
> 
>>    [0] https://godbolt.org/z/3nW14M3v1
>>    [1] https://godbolt.org/z/TcTeMeKbW
> 
> Sorry.  That was:
> 
>      [0] https://godbolt.org/z/ETcxnz4TW

Change

(volatile __typeof__(ptr))(ptr);

for:

(volatile __typeof__(*(ptr)) *)(ptr);

and:

void love_iso(int *x)
{
      __atomic_store_n(cast_volatile(&x), 1,
                       __ATOMIC_RELAXED);
}

for

void love_iso(int *x)
{
      __atomic_store_n(cast_volatile(x), 1,
                       __ATOMIC_RELAXED);
}

Thanks,

Mathieu


>      [1] https://godbolt.org/z/jMjh8YoM4
> -- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com



More information about the lttng-dev mailing list