Minimize more thread contention

This commit is contained in:
gingerBill
2025-09-10 19:30:32 +01:00
parent 21b1173076
commit a36a8722dc
10 changed files with 74 additions and 58 deletions

View File

@@ -153,6 +153,17 @@ gb_internal AstFile *thread_safe_get_ast_file_from_id(i32 index) {
}
// use AFTER PARSER
gb_internal AstFile *thread_unsafe_get_ast_file_from_id(i32 index) {
GB_ASSERT(index >= 0);
AstFile *file = nullptr;
if (index < global_files.count) {
file = global_files[index];
}
return file;
}
// NOTE: defined in build_settings.cpp
gb_internal bool global_warnings_as_errors(void);