1 #include <tpool.h>
2 
3 namespace tpool
4 {
5 static thread_local tpool::thread_pool* tls_thread_pool;
6 
set_tls_pool(tpool::thread_pool * pool)7 extern "C" void set_tls_pool(tpool::thread_pool* pool)
8 {
9   tls_thread_pool = pool;
10 }
11 
tpool_wait_begin()12 extern "C" void tpool_wait_begin()
13 {
14   if (tls_thread_pool)
15     tls_thread_pool->wait_begin();
16 }
17 
18 
tpool_wait_end()19 extern "C" void tpool_wait_end()
20 {
21   if (tls_thread_pool)
22     tls_thread_pool->wait_end();
23 }
24 
25 }
26