summaryrefslogtreecommitdiff
path: root/tpool/wait_notification.cc
blob: 7743e2db7bc9b4d7eff3221f3839ce734776d05d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <tpool.h>

namespace tpool
{
static thread_local tpool::thread_pool* tls_thread_pool;

extern "C" void set_tls_pool(tpool::thread_pool* pool)
{
  tls_thread_pool = pool;
}

extern "C" void tpool_wait_begin()
{
  if (tls_thread_pool)
    tls_thread_pool->wait_begin();
}


extern "C" void tpool_wait_end()
{
  if (tls_thread_pool)
    tls_thread_pool->wait_end();
}

}