Add the permanent and temporary arenas directly on the Thread

This commit is contained in:
gingerBill
2024-07-15 01:05:29 +01:00
parent c64702ae5a
commit a8f84c87ae
3 changed files with 80 additions and 9 deletions

View File

@@ -3,7 +3,10 @@
struct WorkerTask;
struct ThreadPool;
gb_thread_local Thread *current_thread;
gb_global gb_thread_local Thread *current_thread;
gb_internal Thread *get_current_thread(void) {
return current_thread;
}
gb_internal void thread_pool_init(ThreadPool *pool, isize worker_count, char const *worker_name);
gb_internal void thread_pool_destroy(ThreadPool *pool);