The first user of this will be the bitmap.
Signed-off-by: Kmindg <[email protected]>
---
lib/util.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/util.h b/lib/util.h
index dc34ee5..7b506bd 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -475,6 +475,14 @@ rightmost_1bit_idx(uint32_t x)
return ctz32(x);
}
+/* Returns the index of the rightmost 1-bit in 'x' (e.g. 01011000 => 3), or 64
+ * if 'x' is 0. */
+static inline uint64_t
+rightmost_1bit_idx_64(uint64_t x)
+{
+ return ctz64(x);
+}
+
/* Returns the index of the leftmost 1-bit in 'x' (e.g. 01011000 => 6), or 32
* if 'x' is 0.
*
--
1.7.9.5
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev