mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
bitmap: Add new functions.
These will be used in an upcoming commit. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
This commit is contained in:
@@ -104,6 +104,12 @@ size_t bitmap_scan(const unsigned long int *, bool target,
|
||||
size_t start, size_t end);
|
||||
size_t bitmap_count1(const unsigned long *, size_t n);
|
||||
|
||||
void bitmap_and(unsigned long *dst, const unsigned long *arg, size_t n);
|
||||
void bitmap_or(unsigned long *dst, const unsigned long *arg, size_t n);
|
||||
void bitmap_not(unsigned long *dst, size_t n);
|
||||
|
||||
bool bitmap_is_all_zeros(const unsigned long *, size_t n);
|
||||
|
||||
#define BITMAP_FOR_EACH_1(IDX, SIZE, BITMAP) \
|
||||
for ((IDX) = bitmap_scan(BITMAP, 1, 0, SIZE); (IDX) < (SIZE); \
|
||||
(IDX) = bitmap_scan(BITMAP, 1, (IDX) + 1, SIZE))
|
||||
|
Reference in New Issue
Block a user