On Wed, 2016-07-27 at 23:44 +0200, Torvald Riegel wrote: > This replaces the pthread rwlock with a new implementation that uses a > more scalable algorithm (primarily through not using a critical section > anymore to make state changes). The fast path for rdlock acquisition > and release is now basically a single atomic read-modify write or CAS > and a few branches. See nptl/pthread_rwlock_common.c for details. I have noticed two small oversights, which are taken care of in the attached patch. The first is a mssign overflow check (a lock acquired too often as a reader) in one of the tryrdlock branches. The second is a that I had forgotten to apply a cleanup (no correctness change; the former code did more than it had to).