util/idalloc: add util_idalloc_alloc_range

v2: fixed infinite loop (Pierre-Eric)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
This commit is contained in:
Marek Olšák
2021-05-17 16:37:15 -04:00
committed by Marge Bot
parent f29823df66
commit b48998926c
2 changed files with 59 additions and 0 deletions

View File

@@ -58,6 +58,9 @@ util_idalloc_fini(struct util_idalloc *buf);
unsigned
util_idalloc_alloc(struct util_idalloc *buf);
unsigned
util_idalloc_alloc_range(struct util_idalloc *buf, unsigned num);
void
util_idalloc_free(struct util_idalloc *buf, unsigned id);