MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / unlockWrite

Method unlockWrite

deps/physx/physx/source/physx/src/NpScene.cpp:2782–2801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2780}
2781
2782void NpScene::unlockWrite()
2783{
2784 // increment this thread's write depth
2785 ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth));
2786 if (localCounts.writeLockDepth < 1)
2787 {
2788 Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__, "PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.");
2789 return;
2790 }
2791 localCounts.writeLockDepth--;
2792 TlsSetValue(mThreadReadWriteDepth, localCounts.getData());
2793
2794 PX_ASSERT(mCurrentWriter == Thread::getId());
2795
2796 if (localCounts.writeLockDepth == 0)
2797 {
2798 mCurrentWriter = 0;
2799 mRWLock.unlockWriter();
2800 }
2801}
2802
2803PxReal NpScene::getWakeCounterResetValue() const
2804{

Callers 4

TickMethod · 0.80
onTickPreRenderMethod · 0.80
onTickPreRenderMethod · 0.80
~PxSceneWriteLockMethod · 0.80

Calls 5

TlsGetValueFunction · 0.50
TlsSetValueFunction · 0.50
errorMethod · 0.45
getDataMethod · 0.45
unlockWriterMethod · 0.45

Tested by

no test coverage detected