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>
This commit is contained in:
Dave Airlie
2021-03-09 11:19:17 +10:00
parent 0e1afe7c70
commit c55bd4b68d

View File

@@ -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