Merge pull request #1144 from lunkhound/pr-threading-refactor

Bullet 2 threading refactor: moved parallel-for calls into core libs
This commit is contained in:
erwincoumans
2017-06-02 16:18:12 -07:00
committed by GitHub
20 changed files with 1550 additions and 858 deletions

View File

@@ -184,7 +184,7 @@ void MyEnterProfileZoneFunc(const char* msg)
return;
#ifndef BT_NO_PROFILE
int threadId = btQuickprofGetCurrentThreadIndex2();
if (threadId<0)
if (threadId<0 || threadId >= BT_QUICKPROF_MAX_THREAD_COUNT)
return;
if (gStackDepths[threadId] >= MAX_NESTING)
@@ -208,8 +208,8 @@ void MyLeaveProfileZoneFunc()
return;
#ifndef BT_NO_PROFILE
int threadId = btQuickprofGetCurrentThreadIndex2();
if (threadId<0)
return;
if (threadId<0 || threadId >= BT_QUICKPROF_MAX_THREAD_COUNT)
return;
if (gStackDepths[threadId] <= 0)
{