FreeBSD/src 52e8f6a (r354977)share/man/man3 bitstring.3, sys/sys bitstring.h param.h

bitstring: add functions to find contiguous set/unset bit sequences

Add bit_ffs_area_at and bit_ffc_area_at functions for searching a bit
string for a sequence of contiguous set or unset bits of at least the
specified size.

The bit_ffc_area function will be used by the Intel ice driver for
implementing resource assignment logic using a bitstring to represent
whether or not a given index has been assigned or is currently free.

The bit_ffs_area, bit_ffc_area_at and bit_ffs_area_at functions are
implemented for completeness.

I'd like to add further test cases for the new functions, but I'm not
really sure how to add them easily. The new functions depend on specific
sequences of bits being set, while the bitstring tests appear to run for
varying bit sizes.

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>

Submitted by:   Jacob Keller <jacob.e.keller at intel.com>
Reviewed by:    asomers@, erj@
MFC after:      1 week
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D22400
DeltaFile
+167-0tests/sys/sys/bitstring_test.c
+89-1share/man/man3/bitstring.3
+78-0sys/sys/bitstring.h
+1-1sys/sys/param.h
+335-24 files

UnifiedSplitRaw