mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
anv/allocator: Move definition of ANV_FREE_LIST_EMPTY to anv_allocator
While at it also renaming EMPTY to ANV_FREE_LIST_EMPTY_VAL to be more explicit. No changes in behavior expected here. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37669>
This commit is contained in:
parent
950459d95f
commit
4aee4f0975
2 changed files with 4 additions and 4 deletions
|
|
@ -104,7 +104,9 @@
|
|||
|
||||
/* Allocations are always at least 64 byte aligned, so 1 is an invalid value.
|
||||
* We use it to indicate the free list is empty. */
|
||||
#define EMPTY UINT32_MAX
|
||||
#define ANV_FREE_LIST_EMPTY_VAL UINT32_MAX
|
||||
|
||||
#define ANV_FREE_LIST_EMPTY ((union anv_free_list) { { ANV_FREE_LIST_EMPTY_VAL, 0 } })
|
||||
|
||||
/* On FreeBSD PAGE_SIZE is already defined in
|
||||
* /usr/include/machine/param.h that is indirectly
|
||||
|
|
@ -329,7 +331,7 @@ anv_free_list_pop(union anv_free_list *list,
|
|||
union anv_free_list current, new, old;
|
||||
|
||||
current.u64 = list->u64;
|
||||
while (current.offset != EMPTY) {
|
||||
while (current.offset != ANV_FREE_LIST_EMPTY_VAL) {
|
||||
__sync_synchronize();
|
||||
new.offset = table->map[current.offset].next;
|
||||
new.count = current.count + 1;
|
||||
|
|
|
|||
|
|
@ -708,8 +708,6 @@ union anv_free_list {
|
|||
alignas(8) uint64_t u64;
|
||||
};
|
||||
|
||||
#define ANV_FREE_LIST_EMPTY ((union anv_free_list) { { UINT32_MAX, 0 } })
|
||||
|
||||
struct anv_block_state {
|
||||
union {
|
||||
struct {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue