From b289a27c4eb26f0e2984c0cbb1a9a7e07cc40325 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 16 Jan 2023 17:04:37 +0000 Subject: [PATCH] Move the mutex up a little --- src/llvm_backend_general.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp index 1dd36ba14..7846c302a 100644 --- a/src/llvm_backend_general.cpp +++ b/src/llvm_backend_general.cpp @@ -2622,11 +2622,11 @@ gb_internal lbValue lb_find_procedure_value_from_entity(lbModule *m, Entity *e) GB_ASSERT(other_module != nullptr); mutex_lock(&other_module->values_mutex); auto *found = map_get(&other_module->values, e); + mutex_unlock(&other_module->values_mutex); if (found == nullptr) { lbProcedure *missing_proc_in_other_module = lb_create_procedure(other_module, e, false); array_add(&other_module->missing_procedures_to_check, missing_proc_in_other_module); } - mutex_unlock(&other_module->values_mutex); } else { array_add(&m->missing_procedures_to_check, missing_proc); }