diff options
| author | gingerBill <bill@gingerbill.org> | 2021-07-13 23:09:24 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-07-13 23:09:24 +0100 |
| commit | 7a9b7af078da29ca54e4dbd653b4ac0fa46d18c3 (patch) | |
| tree | 04641e379659ffa6c031bf532feba4c6cf1ecbcd /src/check_decl.cpp | |
| parent | 31c7afce1bc33d791542baaddfa9ef72e3ce19c7 (diff) | |
Reduce mutex usage and convert things to queues from arrays
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 4 |
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); } |