From: Ben Warren <b...@skyportsystems.com> This allows lib/meta-flow.h to become exportable
Signed-off-by: Ben Warren <b...@skyportsystems.com> --- include/openvswitch/util.h | 4 ++++ lib/bitmap.h | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/openvswitch/util.h b/include/openvswitch/util.h index cfafc36..2230b2a 100644 --- a/include/openvswitch/util.h +++ b/include/openvswitch/util.h @@ -191,6 +191,10 @@ is_pow2(uintmax_t x) #define RDP2_4(X) (RDP2_5(X) | (RDP2_5(X) >> 2)) #define RDP2_5(X) ( (X) | ( (X) >> 1)) +/* Macros for sizing bitmaps */ +#define BITMAP_ULONG_BITS (sizeof(unsigned long) * CHAR_BIT) +#define BITMAP_N_LONGS(N_BITS) DIV_ROUND_UP(N_BITS, BITMAP_ULONG_BITS) + /* Given ATTR, and TYPE, cast the ATTR to TYPE by first casting ATTR to * (void *). This is to suppress the alignment warning issued by clang. */ #define ALIGNED_CAST(TYPE, ATTR) ((TYPE) (void *) (ATTR)) diff --git a/lib/bitmap.h b/lib/bitmap.h index d541bab..39b7597 100644 --- a/lib/bitmap.h +++ b/lib/bitmap.h @@ -21,8 +21,6 @@ #include <stdlib.h> #include "util.h" -#define BITMAP_ULONG_BITS (sizeof(unsigned long) * CHAR_BIT) - static inline unsigned long * bitmap_unit__(const unsigned long *bitmap, size_t offset) { @@ -35,8 +33,6 @@ bitmap_bit__(size_t offset) return 1UL << (offset % BITMAP_ULONG_BITS); } -#define BITMAP_N_LONGS(N_BITS) DIV_ROUND_UP(N_BITS, BITMAP_ULONG_BITS) - static inline size_t bitmap_n_longs(size_t n_bits) { -- 2.5.0 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev