HomeFreeBSD

locks: plug warnings about unitialized variables

Description

locks: plug warnings about unitialized variables

They only showed up after I redefined LOCKSTAT_ENABLED to 0.

doing_lockprof in mutex.c is a real (but harmless) bug. Should the
value be non-zero it will do checks for lock profiling which would
otherwise be skipped.

state in rwlock.c is a wart from the compiler, the value can't be
used if lock profiling is not enabled.

Sponsored by: The FreeBSD Foundation

Details

Provenance
mjgAuthored on
Parents
rS340409: Make no assertions about lock state when the scheduler is stopped.
Branches
Unknown
Tags
Unknown