aboutsummaryrefslogtreecommitdiff
path: root/src/thread_pool.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-07-15 01:05:29 +0100
committergingerBill <bill@gingerbill.org>2024-07-15 01:05:29 +0100
commita8f84c87ae7b4d30cf197f54cbc05da024a17d24 (patch)
tree38c86b479278565e9bedc31e240c802c168c570c /src/thread_pool.cpp
parentc64702ae5ad57240743fc425bb5029fb9c1cc02e (diff)
Add the permanent and temporary arenas directly on the `Thread`
Diffstat (limited to 'src/thread_pool.cpp')
-rw-r--r--src/thread_pool.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/thread_pool.cpp b/src/thread_pool.cpp
index 62cca6de6..8363a4553 100644
--- a/src/thread_pool.cpp
+++ b/src/thread_pool.cpp
@@ -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);