Replace RecursiveMutex with a BlockingMutex

This commit is contained in:
gingerBill
2023-01-16 18:05:58 +00:00
parent b289a27c4e
commit 65c0255e7e
3 changed files with 15 additions and 14 deletions

View File

@@ -495,15 +495,14 @@ gb_internal LLVMMetadataRef lb_get_base_scope_metadata(lbModule *m, Scope *scope
}
gb_internal LLVMMetadataRef lb_debug_type(lbModule *m, Type *type) {
mutex_lock(&m->debug_values_mutex);
defer (mutex_unlock(&m->debug_values_mutex));
GB_ASSERT(type != nullptr);
LLVMMetadataRef found = lb_get_llvm_metadata(m, type);
if (found != nullptr) {
return found;
}
MUTEX_GUARD(&m->debug_values_mutex);
if (type->kind == Type_Named) {
LLVMMetadataRef file = nullptr;
unsigned line = 0;