You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
bullet: Sync with current upstream master branch
This updates our local copy to commit 5ec8339b6fc491e3f09a34a4516e82787f053fcc. We need a recent master commit for some new features that we use in Godot (see #25543 and #28909). To avoid warnings generated by Bullet headers included in our own module, we include those headers with -isystem on GCC and Clang. Fixes #29503.
This commit is contained in:
@@ -45,14 +45,14 @@ subject to the following restrictions:
|
||||
|
||||
int btGetNumHardwareThreads()
|
||||
{
|
||||
return btMin<int>(BT_MAX_THREAD_COUNT, std::thread::hardware_concurrency());
|
||||
return btMax(1u, btMin(BT_MAX_THREAD_COUNT, std::thread::hardware_concurrency()));
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int btGetNumHardwareThreads()
|
||||
{
|
||||
return btMin<int>(BT_MAX_THREAD_COUNT, sysconf(_SC_NPROCESSORS_ONLN));
|
||||
return btMax(1, btMin<int>(BT_MAX_THREAD_COUNT, sysconf(_SC_NPROCESSORS_ONLN)));
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -304,8 +304,8 @@ void btThreadSupportPosix::stopThreads()
|
||||
checkPThreadFunction(sem_post(threadStatus.startSemaphore));
|
||||
checkPThreadFunction(sem_wait(m_mainSemaphore));
|
||||
|
||||
destroySem(threadStatus.startSemaphore);
|
||||
checkPThreadFunction(pthread_join(threadStatus.thread, 0));
|
||||
destroySem(threadStatus.startSemaphore);
|
||||
}
|
||||
destroySem(m_mainSemaphore);
|
||||
m_activeThreadStatus.clear();
|
||||
|
||||
Reference in New Issue
Block a user