HomeFreeBSD

mtx: tidy up recursion handling in thread lock

Description

mtx: tidy up recursion handling in thread lock

Normally after grabbing the lock it has to be verified we got the right one
to begin with. However, if we are recursing, it must not change thus the
check can be avoided. In particular this avoids a lock read for non-recursing
case which found out the lock was changed.

While here avoid an irq trip of this happens.

Tested by: pho (previous version)

Details

Provenance
mjgAuthored on
Parents
rS330417: MFC r320367: Add "Terminus BSD Console" size 32
Branches
Unknown
Tags
Unknown