HomeFreeBSD

locks: re-check the reason to go to sleep after locking sleepq/turnstile

Description

locks: re-check the reason to go to sleep after locking sleepq/turnstile

In both rw and sx locks we always go to sleep if the lock owner is not
running.

We do spin for some time if the lock is read-locked.

However, if we decide to go to sleep due to the lock owner being off cpu
and after sleepq/turnstile gets acquired the lock is read-locked, we should
fallback to the aforementioned wait.

Details

Provenance
mjgAuthored on
Parents
rS327398: isgreater(3): correct description of isunordered macro
Branches
Unknown
Tags
Unknown