Page MenuHomeFreeBSD

lib/libc/net/nsdispatch.c: Fix missing unlock and add locking annotations
ClosedPublic

Authored by arichardson on Mon, Mar 22, 10:27 AM.

Details

Summary

The error cases (goto fin) of _nsdispatch were missing the unlock.

This change also drops the checks for __isthreaded since the pthread stubs
are already no-ops if threads are not being used. Dropping those conditionals
allows clang's thread safety analysis to deal with the file and also makes
the code a bit more readable. While touching the file also add a few more
assertions in debug mode that the right locks are held.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.