diff options
author | Ben Pfaff <blp@nicira.com> | 2014-07-25 22:23:44 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-07-26 10:31:01 -0700 |
commit | 65d3b0feb280035ebc7f23e744de6cfeff2f6189 (patch) | |
tree | 90014e393194b17bc9009ff4640e117f076d9183 /lib/bitmap.h | |
parent | 771c99c19cb252f7b2aae7279d1bbcb3c49b813c (diff) | |
download | openvswitch-65d3b0feb280035ebc7f23e744de6cfeff2f6189.tar.gz |
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>
Diffstat (limited to 'lib/bitmap.h')
-rw-r--r-- | lib/bitmap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bitmap.h b/lib/bitmap.h index afe6151b4..ace091fad 100644 --- a/lib/bitmap.h +++ b/lib/bitmap.h @@ -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)) |