Page MenuHomeFreeBSD

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

Authored by arichardson on Mar 22 2021, 10:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 12:52 PM
Unknown Object (File)
Feb 12 2024, 4:30 AM
Unknown Object (File)
Feb 8 2024, 2:48 AM
Unknown Object (File)
Dec 23 2023, 9:57 AM
Unknown Object (File)
Dec 20 2023, 5:05 AM
Unknown Object (File)
Dec 12 2023, 5:05 PM
Unknown Object (File)
Nov 7 2023, 1:32 AM
Unknown Object (File)
Oct 6 2023, 12:32 AM
Subscribers

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable