diff options
| author | gingerBill <bill@gingerbill.org> | 2021-07-27 23:14:01 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-07-27 23:14:01 +0100 |
| commit | a5d6fda4338641a64d07b353129e5731a6517941 (patch) | |
| tree | 0cce749ad561e7a27b3c5eb0d6443f3d58a6df34 /src/check_type.cpp | |
| parent | 4bc3796f9b9e8ea00ff0da89f6e983345fb2fd7e (diff) | |
Define which mutexes are blocking and recursive explicitly
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<Operand> 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, |