HomeFreeBSD

Restructure normal (non-error) control flow in sem_close().

Description

Restructure normal (non-error) control flow in sem_close().

Do not retest for the found semaphore after the loop to look it up.
Instead, handle both cases of last and non-last close simultaneously,
which allows to consolidate the list unlock and successful return.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on
Parents
rS317609: MFC r316749 (by cem):
Branches
Unknown
Tags
Unknown