HomeFreeBSD

locks: retry turnstile/sleepq loops on failed cmpset

Description

locks: retry turnstile/sleepq loops on failed cmpset

In order to go to sleep threads set waiter flags, but that can spuriously
fail e.g. when a new reader arrives. Instead of unlocking everything and
looping back, re-evaluate the new state while still holding the lock necessary
to go to sleep.

Details

Provenance
mjgAuthored on
Parents
rS326194: rwlock: stop re-reading the owner when going to sleep
Branches
Unknown
Tags
Unknown