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

Method unlockRead

deps/physx/physx/source/physx/src/NpScene.cpp:2743–2758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2741}
2742
2743void NpScene::unlockRead()
2744{
2745 // increment this threads read depth
2746 ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth));
2747 if(localCounts.readLockDepth < 1)
2748 {
2749 Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__, "PxScene::unlockRead() called without matching call to PxScene::lockRead(), behaviour will be undefined.");
2750 return;
2751 }
2752 localCounts.readLockDepth--;
2753 TlsSetValue(mThreadReadWriteDepth, localCounts.getData());
2754
2755 // only unlock on last read
2756 if(localCounts.readLockDepth == 0)
2757 mRWLock.unlockReader();
2758}
2759
2760void NpScene::lockWrite(const char* file, PxU32 line)
2761{

Callers 4

TickMethod · 0.80
runMethod · 0.80
sendEntireSceneMethod · 0.80
~PxSceneReadLockMethod · 0.80

Calls 5

TlsGetValueFunction · 0.50
TlsSetValueFunction · 0.50
errorMethod · 0.45
getDataMethod · 0.45
unlockReaderMethod · 0.45

Tested by

no test coverage detected