It will come in handy elsewhere in upcoming commits.
Signed-off-by: Ben Pfaff <[email protected]>
---
lib/fat-rwlock.c | 5 -----
lib/util.h | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/fat-rwlock.c b/lib/fat-rwlock.c
index 9ffa37b..3866dda 100644
--- a/lib/fat-rwlock.c
+++ b/lib/fat-rwlock.c
@@ -25,11 +25,6 @@
#include "ovs-thread.h"
#include "random.h"
-/* This system's cache line size, in bytes.
- * Being wrong hurts performance but not correctness. */
-#define CACHE_LINE_SIZE 64 /* Correct for most CPUs. */
-BUILD_ASSERT_DECL(IS_POW2(CACHE_LINE_SIZE));
-
struct fat_rwlock_slot {
/* Membership in rwlock's list of "struct fat_rwlock_slot"s.
*
diff --git a/lib/util.h b/lib/util.h
index 41fd51d..64516a8 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -145,6 +145,11 @@ is_pow2(uintmax_t x)
#define RDP2_4(X) (RDP2_5(X) | (RDP2_5(X) >> 2))
#define RDP2_5(X) ( (X) | ( (X) >> 1))
+/* This system's cache line size, in bytes.
+ * Being wrong hurts performance but not correctness. */
+#define CACHE_LINE_SIZE 64
+BUILD_ASSERT_DECL(IS_POW2(CACHE_LINE_SIZE));
+
#ifndef MIN
#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
#endif
--
1.7.10.4
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev