Re: [PATCH v4 00/15] Add futex2 syscalls
From: Florian Weimer
Date: Tue Jun 08 2021 - 14:19:41 EST
* 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.
Thanks,
Florian