xenserver: Restart ovs-xapi-sync on kmod reload.
[sliver-openvswitch.git] / lib / util.h
index 1649c59..b2052f3 100644 (file)
 #define BUILD_ASSERT_DECL BOOST_STATIC_ASSERT
 #endif /* __cplusplus */
 
+#ifdef __GNUC__
+#define BUILD_ASSERT_GCCONLY(EXPR) BUILD_ASSERT(EXPR)
+#define BUILD_ASSERT_DECL_GCCONLY(EXPR) BUILD_ASSERT_DECL(EXPR)
+#else
+#define BUILD_ASSERT_GCCONLY(EXPR) ((void) 0)
+#define BUILD_ASSERT_DECL_GCCONLY(EXPR) ((void) 0)
+#endif
+
 extern const char *program_name;
 
 /* Returns the number of elements in ARRAY. */
@@ -194,7 +202,12 @@ char *base_name(const char *file_name);
 char *abs_file_name(const char *dir, const char *file_name);
 
 void ignore(bool x OVS_UNUSED);
-int log_2_floor(uint32_t n);
+int log_2_floor(uint32_t);
+int log_2_ceil(uint32_t);
+int ctz(uint32_t);
+
+bool is_all_zeros(const uint8_t *, size_t);
+bool is_all_ones(const uint8_t *, size_t);
 
 #ifdef  __cplusplus
 }