Merge pull request #1431 from kwasimensah/master
Fix MACROS for when BT_THREADSAFE is defined
This commit is contained in:
@@ -708,7 +708,8 @@ unsigned int btQuickprofGetCurrentThreadIndex2() {
|
|||||||
|
|
||||||
#if BT_THREADSAFE
|
#if BT_THREADSAFE
|
||||||
return btGetCurrentThreadIndex();
|
return btGetCurrentThreadIndex();
|
||||||
#elif defined(BT_HAVE_TLS)
|
#else
|
||||||
|
#if defined(BT_HAVE_TLS)
|
||||||
static __thread unsigned int sThreadIndex = kNullIndex;
|
static __thread unsigned int sThreadIndex = kNullIndex;
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
__declspec(thread) static unsigned int sThreadIndex = kNullIndex;
|
__declspec(thread) static unsigned int sThreadIndex = kNullIndex;
|
||||||
@@ -723,6 +724,7 @@ unsigned int btQuickprofGetCurrentThreadIndex2() {
|
|||||||
sThreadIndex = gThreadCounter++;
|
sThreadIndex = gThreadCounter++;
|
||||||
}
|
}
|
||||||
return sThreadIndex;
|
return sThreadIndex;
|
||||||
|
#endif //BT_THREADSAFE
|
||||||
}
|
}
|
||||||
|
|
||||||
void btEnterProfileZoneDefault(const char* name)
|
void btEnterProfileZoneDefault(const char* name)
|
||||||
|
|||||||
Reference in New Issue
Block a user