diff options
author | Marek Olšák <marek.olsak@amd.com> | 2024-07-09 08:15:23 -0400 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-07-17 10:29:12 +0000 |
commit | 287ed620d0de450fd1b8141e14227a2033434715 (patch) | |
tree | de43f951a785b694da4329ca0ee36644a999b71d /src/util | |
parent | 2d260314f101540298edf973f5393e3468ed84ba (diff) |
util: make util_idalloc_exists private
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30106>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/u_idalloc.c | 7 | ||||
-rw-r--r-- | src/util/u_idalloc.h | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/util/u_idalloc.c b/src/util/u_idalloc.c index 9cae590d3e0..2873957eb01 100644 --- a/src/util/u_idalloc.c +++ b/src/util/u_idalloc.c @@ -36,6 +36,13 @@ #include "util/u_math.h" #include <stdlib.h> +ASSERTED static bool +util_idalloc_exists(struct util_idalloc *buf, unsigned id) +{ + return id / 32 < buf->num_set_elements && + buf->data[id / 32] & BITFIELD_BIT(id % 32); +} + static void util_idalloc_resize(struct util_idalloc *buf, unsigned new_num_elements) { diff --git a/src/util/u_idalloc.h b/src/util/u_idalloc.h index baf1278378c..eac0b68575d 100644 --- a/src/util/u_idalloc.h +++ b/src/util/u_idalloc.h @@ -69,13 +69,6 @@ util_idalloc_free(struct util_idalloc *buf, unsigned id); void util_idalloc_reserve(struct util_idalloc *buf, unsigned id); -static inline bool -util_idalloc_exists(struct util_idalloc *buf, unsigned id) -{ - return id / 32 < buf->num_set_elements && - buf->data[id / 32] & BITFIELD_BIT(id % 32); -} - #define util_idalloc_foreach(buf, id) \ for (uint32_t i = 0, mask = (buf)->num_set_elements ? (buf)->data[0] : 0, id, \ count = (buf)->num_used; \ |