Lines Matching +full:in +full:-

4  * SPDX-License-Identifier: Apache-2.0
26 * @brief Store and manipulate bits in a bit array.
54 * @param total_bits Total number of bits in this bitarray object.
72 * @param total_bits Total number of bits in this bitarray object.
81 * @param total_bits Total number of bits in this bitarray object.
87 * Set a bit in a bit array
89 * @param[in] bitarray Bitarray struct
90 * @param[in] bit The bit to be set
93 * @retval -EINVAL Invalid argument (e.g. bit to set exceeds
94 * the number of bits in bit array, etc.)
99 * Clear a bit in a bit array
101 * @param[in] bitarray Bitarray struct
102 * @param[in] bit The bit to be cleared
105 * @retval -EINVAL Invalid argument (e.g. bit to clear exceeds
106 * the number of bits in bit array, etc.)
113 * @param[in] bitarray Bitarray struct
114 * @param[in] bit The bit to be tested
118 * @retval -EINVAL Invalid argument (e.g. bit to test exceeds
119 * the number of bits in bit array, etc.)
126 * @param[in] bitarray Bitarray struct
127 * @param[in] bit The bit to be tested and set
131 * @retval -EINVAL Invalid argument (e.g. bit to test exceeds
132 * the number of bits in bit array, etc.)
139 * @param[in] bitarray Bitarray struct
140 * @param[in] bit The bit to be tested and cleared
144 * @retval -EINVAL Invalid argument (e.g. bit to test exceeds
145 * the number of bits in bit array, etc.)
150 * Allocate bits in a bit array
152 * This finds a number of bits (@p num_bits) in a contiguous of
157 * @param[in] bitarray Bitarray struct
158 * @param[in] num_bits Number of bits to allocate
163 * @retval -EINVAL Invalid argument (e.g. allocating more bits than
165 * @retval -ENOSPC No contiguous region big enough to accommodate
172 * Calculates the bit-wise XOR of two bitarrays in a region.
173 * The result is stored in the first bitarray passed in (@p dst).
178 * @param num_bits Number of bits in the region, must be larger than 0
182 * @retval -EINVAL Invalid argument (e.g. out-of-bounds access, mismatching bitarrays, trying to xor
188 * Find nth bit set in region
190 * This counts the number of bits set (@p count) in a
196 * @param[in] bitarray Bitarray struct
197 * @param[in] n Nth bit set to look for
198 * @param[in] num_bits Number of bits to check, must be larger than 0
199 * @param[in] offset Starting bit position
203 * @retval 1 Nth bit set was not found in region
204 * @retval -EINVAL Invalid argument (e.g. out-of-bounds access, trying to count 0 bits, etc.)
210 * Count bits set in a bit array region
212 * This counts the number of bits set (@p count) in a
215 * @param[in] bitarray Bitarray struct
216 * @param[in] num_bits Number of bits to check, must be larger than 0
217 * @param[in] offset Starting bit position
218 * @param[out] count Number of bits set in the region if successful
221 * @retval -EINVAL Invalid argument (e.g. out-of-bounds access, trying to count 0 bits, etc.)
227 * Free bits in a bit array
237 * @retval -EINVAL Invalid argument (e.g. try to free more bits than
239 * @retval -EFAULT The bits in the indicated region are not all allocated.
245 * Test if bits in a region is all set.
247 * This tests if the number of bits (@p num_bits) in region starting
261 * Test if bits in a region is all cleared.
263 * This tests if the number of bits (@p num_bits) in region starting
277 * Set all bits in a region.
279 * This sets the number of bits (@p num_bits) in region starting
287 * @retval -EINVAL Invalid argument (e.g. bit to set exceeds
288 * the number of bits in bit array, etc.)
294 * Test if all bits in a region are cleared/set and set/clear them
295 * in a single atomic operation
297 * This checks if all the bits (@p num_bits) in region starting
298 * from @p offset are in required state. If even one bit is not,
299 * -EEXIST is returned. If the whole region is set/cleared
310 * @retval -EINVAL Invalid argument (e.g. bit to set exceeds
311 * the number of bits in bit array, etc.)
312 * @retval -EEXIST at least one bit in the region is set/cleared,
319 * Clear all bits in a region.
321 * This clears the number of bits (@p num_bits) in region starting
329 * @retval -EINVAL Invalid argument (e.g. bit to set exceeds
330 * the number of bits in bit array, etc.)