pub unsafe extern "C" fn sys_bitarray_find_nth_set(
bitarray: *mut sys_bitarray,
n: usize,
num_bits: usize,
offset: usize,
found_at: *mut usize,
) -> i32Expand description
Find nth bit set in region
This counts the number of bits set (@p count) in a region (@p offset, @p num_bits) and returns the index (@p found_at) of the nth set bit, if it exists, as long with a zero return value.
If it does not exist, @p found_at is not updated and the method returns
@param[in] bitarray Bitarray struct @param[in] n Nth bit set to look for @param[in] num_bits Number of bits to check, must be larger than 0 @param[in] offset Starting bit position @param[out] found_at Index of the nth bit set, if found
@retval 0 Operation successful @retval 1 Nth bit set was not found in region @retval -EINVAL Invalid argument (e.g. out-of-bounds access, trying to count 0 bits, etc.)