From 7a9b7af078da29ca54e4dbd653b4ac0fa46d18c3 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 13 Jul 2021 23:09:24 +0100 Subject: Reduce mutex usage and convert things to queues from arrays --- src/check_decl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/check_decl.cpp') diff --git a/src/check_decl.cpp b/src/check_decl.cpp index a82215815..c7f4ce761 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -901,9 +901,7 @@ void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast *type_expr, } if (ac.require_declaration) { - gb_mutex_lock(&ctx->info->entity_mutex); - array_add(&ctx->info->required_global_variables, e); - gb_mutex_unlock(&ctx->info->entity_mutex); + mpmc_enqueue(&ctx->info->required_global_variable_queue, e); } -- cgit v1.2.3