mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
bitops: Add for_each_bit helper
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
c5083e4750
commit
aa53547aed
@ -106,6 +106,11 @@ found_middle:
|
||||
return result + __ffs(tmp);
|
||||
}
|
||||
|
||||
#define for_each_bit(i, bitmask) \
|
||||
for (i = find_next_bit(bitmask, sizeof(bitmask), 0); \
|
||||
i < sizeof(bitmask); \
|
||||
i = find_next_bit(bitmask, sizeof(bitmask), i + 1))
|
||||
|
||||
#else /* CONFIG_X86_64 */
|
||||
# error x86-32 is not implemented yet
|
||||
#endif /* CONFIG_X86_64 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user