Add bnxt_find_next_zero_bit()/bnxt_find_first_zero_bit()/
bnxt_test_and_set_bit()/bnxt_find_next_bit()/bnxt_test_and_clear_bit(),
wrapping sys/bitstring.h's bit_test()/bit_set()/bit_clear() with the
find-first/find-next and atomic test-and-flip semantics the kTLS
key-context ID allocator needs; bitstring.h has no equivalent
primitives.
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Can't most these just be implemented in terms of the already existing primitives in sys/bitstring.h? Eg, bnxt_find_first_zero_bit -> bit_ffc bnxt_find_next_zero_bit -> bit_ffc_at bnxt_find_next_bit > bit_ffs_
The ones that can't have misleading naming. test_and_set and test_and_clear sound atomic, but these aren't. I might include non-atomic in the names.