mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-11 22:01:25 -07:00
Replace condition+mutex with futex
This commit is contained in:
+2
-1
@@ -1935,7 +1935,7 @@ gb_internal void add_type_info_type_internal(CheckerContext *c, Type *t) {
|
||||
|
||||
|
||||
|
||||
gb_global bool global_procedure_body_in_worker_queue = false;
|
||||
gb_global std::atomic<bool> global_procedure_body_in_worker_queue = false;
|
||||
|
||||
gb_internal void check_procedure_later(CheckerContext *c, ProcInfo *info) {
|
||||
GB_ASSERT(info != nullptr);
|
||||
@@ -5264,6 +5264,7 @@ gb_internal WORKER_TASK_PROC(thread_proc_body) {
|
||||
gb_internal void check_procedure_bodies(Checker *c) {
|
||||
GB_ASSERT(c != nullptr);
|
||||
|
||||
|
||||
u32 thread_count = cast(u32)gb_max(build_context.thread_count, 1);
|
||||
u32 worker_count = thread_count-1; // NOTE(bill): The main thread will also be used for work
|
||||
if (!build_context.threaded_checker) {
|
||||
|
||||
Reference in New Issue
Block a user