Commit e0f5c89b authored by atraczyk's avatar atraczyk Committed by Guillaume Roguez

build: use thread_local instead of __thread for UWP build

- Causes the UWP build condition to use thread_local when
  registering threads with pj_thread_register(), as __thread is
  not available. Note: __declspec(thread) is also equivalent.

Change-Id: Ibee418d4c7084264acb0591015cdb8f72abc50ba
Tuleap: #790
parent c8740c4b
......@@ -56,7 +56,7 @@ register_thread()
{
// We have to register the external thread so it could access the pjsip frameworks
if (!pj_thread_is_registered()) {
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || defined RING_UWP
static thread_local pj_thread_desc desc;
static thread_local pj_thread_t *this_thread;
#else
......
......@@ -716,7 +716,7 @@ void SIPAccount::doRegister()
std::thread{ [shared] {
/* We have to register the external thread so it could access the pjsip frameworks */
if (!pj_thread_is_registered()) {
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || defined RING_UWP
static thread_local pj_thread_desc desc;
static thread_local pj_thread_t *this_thread;
#else
......
......@@ -674,7 +674,7 @@ SIPVoIPLink::handleEvents()
{
// We have to register the external thread so it could access the pjsip frameworks
if (!pj_thread_is_registered()) {
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || defined RING_UWP
static thread_local pj_thread_desc desc;
static thread_local pj_thread_t *this_thread;
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment