[libc-commits] [libc] [libc][rwlock] fix timeout writer signal stealing problem (PR #201937)
Pavel Labath via libc-commits
libc-commits at lists.llvm.org
Wed Jun 10 01:18:38 PDT 2026
================
@@ -405,22 +405,55 @@ class RawRwLock {
}
// Phase 7: unregister ourselves as a pending reader/writer.
+ bool writer_serial_changed = false;
{
// Similarly, the unregister operation should also be an atomic
// transaction.
WaitingQueue::Guard guard = queue.acquire(is_pshared);
guard.pending_count<role>()--;
- // Clear the flag if we are the last reader. The flag must be
+ // Clear the flag if we are the last one. The flag must be
// cleared otherwise operations like trylock may fail even though
// there is no competitors.
----------------
labath wrote:
The AI is kind of right here. Its comment reads better.
https://github.com/llvm/llvm-project/pull/201937
More information about the libc-commits
mailing list