aboutsummaryrefslogtreecommitdiff
path: root/src/thread_pool.cpp
diff options
context:
space:
mode:
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);