hw_claim_unused_from_range() function
Atomically claim one resource out of a range of resources, optionally asserting if none are free
Arguments
bits
pointer to an array of bits (8 bits per byte)
required
true if this method should panic if the resource is not free
bit_lsb
the lower bound (inclusive) of the resource range to claim from
bit_msb
the upper bound (inclusive) of the resource range to claim from
message
string to display if the bit cannot be claimed
Return value
the bit index representing the claimed or -1 if none are available in the range, and required = false