mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-06 02:34:05 +00:00
Remove global_ prefix from global_thread_pool_* procedures
This commit is contained in:
@@ -4654,9 +4654,9 @@ gb_internal void check_with_workers(Checker *c, WorkerTaskProc *proc, isize tota
|
||||
|
||||
|
||||
for (isize i = 0; i < thread_count; i++) {
|
||||
global_thread_pool_add_task(proc, thread_data+i);
|
||||
thread_pool_add_task(proc, thread_data+i);
|
||||
}
|
||||
global_thread_pool_wait();
|
||||
thread_pool_wait();
|
||||
semaphore_wait(&c->info.collect_semaphore);
|
||||
}
|
||||
|
||||
@@ -4704,9 +4704,9 @@ gb_internal void check_collect_entities_all(Checker *c) {
|
||||
if (build_context.threaded_checker) {
|
||||
for (auto const &entry : c->info.files.entries) {
|
||||
AstFile *f = entry.value;
|
||||
global_thread_pool_add_task(check_collect_entities_all_worker_proc, f);
|
||||
thread_pool_add_task(check_collect_entities_all_worker_proc, f);
|
||||
}
|
||||
global_thread_pool_wait();
|
||||
thread_pool_wait();
|
||||
} else {
|
||||
for (auto const &entry : c->info.files.entries) {
|
||||
AstFile *f = entry.value;
|
||||
@@ -5350,9 +5350,9 @@ gb_internal void check_procedure_bodies(Checker *c) {
|
||||
semaphore_post(&c->procs_to_check_semaphore, cast(i32)thread_count);
|
||||
|
||||
for (isize i = 0; i < thread_count; i++) {
|
||||
global_thread_pool_add_task(thread_proc_body, thread_data+i);
|
||||
thread_pool_add_task(thread_proc_body, thread_data+i);
|
||||
}
|
||||
global_thread_pool_wait();
|
||||
thread_pool_wait();
|
||||
semaphore_wait(&c->procs_to_check_semaphore);
|
||||
|
||||
isize global_remaining = c->procs_to_check_queue.count.load(std::memory_order_relaxed);
|
||||
|
||||
@@ -2272,7 +2272,7 @@ gb_internal void lb_generate_code(lbGenerator *gen) {
|
||||
wd->code_gen_file_type = code_gen_file_type;
|
||||
wd->filepath_obj = filepath_obj;
|
||||
wd->m = m;
|
||||
global_thread_pool_add_task(lb_llvm_emit_worker_proc, wd);
|
||||
thread_pool_add_task(lb_llvm_emit_worker_proc, wd);
|
||||
}
|
||||
|
||||
thread_pool_wait(&global_thread_pool);
|
||||
|
||||
@@ -20,10 +20,10 @@ gb_internal void init_global_thread_pool(void) {
|
||||
isize worker_count = thread_count-1; // NOTE(bill): The main thread will also be used for work
|
||||
thread_pool_init(&global_thread_pool, permanent_allocator(), worker_count, "ThreadPoolWorker");
|
||||
}
|
||||
gb_internal bool global_thread_pool_add_task(WorkerTaskProc *proc, void *data) {
|
||||
gb_internal bool thread_pool_add_task(WorkerTaskProc *proc, void *data) {
|
||||
return thread_pool_add_task(&global_thread_pool, proc, data);
|
||||
}
|
||||
gb_internal void global_thread_pool_wait(void) {
|
||||
gb_internal void thread_pool_wait(void) {
|
||||
thread_pool_wait(&global_thread_pool);
|
||||
}
|
||||
|
||||
|
||||
@@ -4910,7 +4910,7 @@ gb_internal void parser_add_file_to_process(Parser *p, AstPackage *pkg, FileInfo
|
||||
auto wd = gb_alloc_item(permanent_allocator(), ParserWorkerData);
|
||||
wd->parser = p;
|
||||
wd->imported_file = f;
|
||||
global_thread_pool_add_task(parser_worker_proc, wd);
|
||||
thread_pool_add_task(parser_worker_proc, wd);
|
||||
}
|
||||
|
||||
gb_internal WORKER_TASK_PROC(foreign_file_worker_proc) {
|
||||
@@ -4948,7 +4948,7 @@ gb_internal void parser_add_foreign_file_to_process(Parser *p, AstPackage *pkg,
|
||||
wd->parser = p;
|
||||
wd->imported_file = f;
|
||||
wd->foreign_kind = kind;
|
||||
global_thread_pool_add_task(foreign_file_worker_proc, wd);
|
||||
thread_pool_add_task(foreign_file_worker_proc, wd);
|
||||
}
|
||||
|
||||
|
||||
@@ -5798,7 +5798,7 @@ gb_internal ParseFileError parse_packages(Parser *p, String init_filename) {
|
||||
}
|
||||
}
|
||||
|
||||
global_thread_pool_wait();
|
||||
thread_pool_wait();
|
||||
|
||||
for (ParseFileErrorNode *node = p->file_error_head; node != nullptr; node = node->next) {
|
||||
if (node->err != ParseFile_None) {
|
||||
|
||||
Reference in New Issue
Block a user