From a5d6fda4338641a64d07b353129e5731a6517941 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 27 Jul 2021 23:14:01 +0100 Subject: Define which mutexes are blocking and recursive explicitly --- src/check_type.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/check_type.cpp') diff --git a/src/check_type.cpp b/src/check_type.cpp index f65768277..4822b3f0d 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -236,8 +236,8 @@ bool check_custom_align(CheckerContext *ctx, Ast *node, i64 *align_) { Entity *find_polymorphic_record_entity(CheckerContext *ctx, Type *original_type, isize param_count, Array const &ordered_operands, bool *failure) { - gb_mutex_lock(&ctx->info->gen_types_mutex); - defer (gb_mutex_unlock(&ctx->info->gen_types_mutex)); + mutex_lock(&ctx->info->gen_types_mutex); + defer (mutex_unlock(&ctx->info->gen_types_mutex)); auto *found_gen_types = map_get(&ctx->info->gen_types, hash_pointer(original_type)); if (found_gen_types != nullptr) { @@ -318,7 +318,7 @@ void add_polymorphic_record_entity(CheckerContext *ctx, Ast *node, Type *named_t named_type->Named.type_name = e; - gb_mutex_lock(&ctx->info->gen_types_mutex); + mutex_lock(&ctx->info->gen_types_mutex); auto *found_gen_types = map_get(&ctx->info->gen_types, hash_pointer(original_type)); if (found_gen_types) { array_add(found_gen_types, e); @@ -327,7 +327,7 @@ void add_polymorphic_record_entity(CheckerContext *ctx, Ast *node, Type *named_t array_add(&array, e); map_set(&ctx->info->gen_types, hash_pointer(original_type), array); } - gb_mutex_unlock(&ctx->info->gen_types_mutex); + mutex_unlock(&ctx->info->gen_types_mutex); } Type *check_record_polymorphic_params(CheckerContext *ctx, Ast *polymorphic_params, -- cgit v1.2.3