[PATCH] Use C11 atomics instead of atomic_bit_set/bit_test_set

Wilco Dijkstra Wilco.Dijkstra@arm.com
Tue Sep 6 16:49:54 GMT 2022


Hi Florian,

> Why is acquire MO required here?  I don't see any synchronizing store.
> Isn't this mostly a compiler barrier for use-after-free detection?

You're right, it looks like the only reason for atomic is to ensure memory
is only freed once. A few cancelhandling accesses use acquire, and there
are various relaxed loads and even non-atomic loads of it, but not a
single release store, so there is no use for acquire MO here.

Cheers,
Wilco

v2: 




More information about the Libc-alpha mailing list