summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2024-07-09 08:15:23 -0400
committerMarge Bot <emma+marge@anholt.net>2024-07-17 10:29:12 +0000
commit287ed620d0de450fd1b8141e14227a2033434715 (patch)
treede43f951a785b694da4329ca0ee36644a999b71d /src/util
parent2d260314f101540298edf973f5393e3468ed84ba (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.c7
-rw-r--r--src/util/u_idalloc.h7
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; \