aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp4
1 files changed, 1 insertions, 3 deletions
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);
}