On 11/18/23 7:18 PM, Bart Van Assche wrote:
[...]
>> Add helpers around test_and_{set,clear}_bit() that allow to search for
>> clear or set bits and flip them atomically.
>
> There is a typo in the subject: shouldn't "atomig" be changed
> into "atomic"?
And "biops" to "bitops"? :-)
> Thanks,
On 11/18/23 07:50, Yury Norov wrote:
Add helpers around test_and_{set,clear}_bit() that allow to search for
clear or set bits and flip them atomically.
There is a typo in the subject: shouldn't "atomig" be changed
into "atomic"?
Thanks,
Bart.
Add helpers around test_and_{set,clear}_bit() that allow to search for
clear or set bits and flip them atomically.
The target patterns may look like this:
for (idx = 0; idx < nbits; idx++)
if (test_and_clear_bit(idx, bitmap))
do_something(idx);
Or