From 0a78c22666e3c8e4dfaa5e59c7a1721be95ef9ce Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 10 Mar 2021 11:59:24 +0100 Subject: [PATCH] mesa/hash: make the mtx non-recursive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that no one is recursively locking it we can switch to a plain mutex. Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/hash.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c index 9ad89b23f60..fd82114ec62 100644 --- a/src/mesa/main/hash.c +++ b/src/mesa/main/hash.c @@ -62,11 +62,7 @@ _mesa_NewHashTable(void) } _mesa_hash_table_set_deleted_key(table->ht, uint_key(DELETED_KEY_VALUE)); - /* - * Needs to be recursive, since the callback in _mesa_HashWalk() - * is allowed to call _mesa_HashRemove(). - */ - mtx_init(&table->Mutex, mtx_recursive); + mtx_init(&table->Mutex, mtx_plain); } else { _mesa_error_no_memory(__func__);