About Social Code
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2021-03-09 11:19:17 +1000
committerDave Airlie <airlied@redhat.com>2021-03-10 06:16:05 +1000
commitc55bd4b68dd07bb7554d4d365bedb2955cf7dc5d (patch)
treeaa934b202e3525a4e567bc31457523b00fd80988
parent0e1afe7c70a9037b6038ffac3a8c11c58a97df90 (diff)
util/bitset: add a new last bit api
This is to be used where the bitset is a predefined array size. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9456>
-rw-r--r--src/util/bitset.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/bitset.h b/src/util/bitset.h
index 61f6db8f4d1..8225070f703 100644
--- a/src/util/bitset.h
+++ b/src/util/bitset.h
@@ -109,6 +109,7 @@ __bitset_last_bit(const BITSET_WORD *x, int n)
}
#define BITSET_FFS(x) __bitset_ffs(x, ARRAY_SIZE(x))
+#define BITSET_LAST_BIT(x) __bitset_last_bit(x, ARRAY_SIZE(x))
#define BITSET_LAST_BIT_SIZED(x, size) __bitset_last_bit(x, size)
static inline unsigned