Implement for_each_clear_bit() function macro in the LinuxKPI.

MFC after:	1 week
Submitted by:	Johannes Lundberg <johalun0@gmail.com>
Sponsored by:	Mellanox Technologies
Sponsored by:	Limelight Networks
This commit is contained in:
hselasky 2018-03-04 18:10:18 +00:00
parent 1a484bcfce
commit 3c7c22a9aa

View File

@ -390,6 +390,10 @@ linux_reg_op(unsigned long *bitmap, int pos, int order, int reg_op)
(bit) < (size); \
(bit) = find_next_bit((addr), (size), (bit) + 1))
#define for_each_clear_bit(bit, addr, size) \
for ((bit) = find_first_zero_bit((addr), (size)); \
(bit) < (size); \
(bit) = find_next_zero_bit((addr), (size), (bit) + 1))
static inline uint64_t
sign_extend64(uint64_t value, int index)