Reduce mutex usage and convert things to queues from arrays

This commit is contained in:
gingerBill committed 2021-07-13 23:09:24 +01:00
1 parent 31c7afce1b
commit 7a9b7af078
5 files changed
+204 -118

No files matched your search

+1 -3
View File
@@ -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);
}