[PATCH] Use C11 atomics instead of atomic_and/or

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Sep 22 14:06:09 GMT 2022


Hi Adhemerval,

> LGTM, the current atomic_or and atomic_and have acquire semantic already.  What
> I am not not sure if if we need to use release MO on start_thread, since the
> idea is to synchronize with the locking on pthread_mutex_lock.

Indeed, it is not clear what is being synchronized with the FUTEX_OWNER_DIED
flag. However it is being used in a lock, so I kept the implied acquire MO of the
old atomics. If it is simply a flag that does not affect locking and the data
protected by the lock, then relaxed MO would be correct. However that requires
detective work to try to reverse engineer the intended implementation...

Cheers,
Wilco



More information about the Libc-alpha mailing list