On 08/06/2021 15:19, Florian Weimer wrote: > * Adhemerval Zanella: > >> Also currently we don't have a specific usage. The proposed patch to >> add the 'pthread_mutex_lock_any' and 'pthreada_timedlock_any' [3] >> also did not gave much detail in realword usages or how it can be >> leveraged. > > The current rwlock implementation in glibc uses a torn 32-bit futex read > which is part of an atomically updated 64-bit word. That's just really, > really ugly, and I suspect we could make that go away with futex2. You are right, I had in the mind the multiple wait proposed by this patch and by the glib RFC one. Not only rwlock, but the posix semaphore might also be simplified on 32 bits I think.