|
@@ -29,7 +29,7 @@ using PhysicsLockContext = const BodyManager *;
|
|
|
|
|
|
/// Helpers to safely lock the different mutexes that are part of the physics system while preventing deadlock
|
|
|
/// Class that keeps track per thread which lock are taken and if the order of locking is correct
|
|
|
-class PhysicsLock
|
|
|
+class JPH_EXPORT PhysicsLock
|
|
|
{
|
|
|
public:
|
|
|
#ifdef JPH_ENABLE_ASSERTS
|
|
@@ -86,11 +86,11 @@ private:
|
|
|
PhysicsLockContext mContext = nullptr;
|
|
|
};
|
|
|
|
|
|
- static thread_local LockData sLocks[4];
|
|
|
-
|
|
|
// Helper function to find the locked mutexes for a particular context
|
|
|
static uint32 & sGetLockedMutexes(PhysicsLockContext inContext)
|
|
|
{
|
|
|
+ static thread_local LockData sLocks[4];
|
|
|
+
|
|
|
// If we find a matching context we can use it
|
|
|
for (LockData &l : sLocks)
|
|
|
if (l.mContext == inContext)
|