mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-01 02:42:09 +00:00
Minimize more thread contention
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user