Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/kern/subr_witness.c | ||
---|---|---|
2529 | Would it be useful to instead have witness_is_owned() take a mask of LA_ flags like witness_assert() and return a boolean indicating whether the lock satisfied the requested flags? Also, could the common logic here be factored out into a helper that's used by both witness_assert() and witness_is_owned()? Another option might be to change witness_assert() to return a boolean and take something like an LA_NOPANIC flag to indicate the caller wants to handle the failed check on its own, then you could keep all the lock-state logic in a single function. |