MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / unlockRead

Method unlockRead

physx/source/physx/src/NpScene.cpp:2693–2708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2691}
2692
2693void NpScene::unlockRead()
2694{
2695 // increment this threads read depth
2696 ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth));
2697 if(localCounts.readLockDepth < 1)
2698 {
2699 Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__, "PxScene::unlockRead() called without matching call to PxScene::lockRead(), behaviour will be undefined.");
2700 return;
2701 }
2702 localCounts.readLockDepth--;
2703 TlsSetValue(mThreadReadWriteDepth, localCounts.getData());
2704
2705 // only unlock on last read
2706 if(localCounts.readLockDepth == 0)
2707 mRWLock.unlockReader();
2708}
2709
2710void NpScene::lockWrite(const char* file, PxU32 line)
2711{

Callers 3

runMethod · 0.80
sendEntireSceneMethod · 0.80
~PxSceneReadLockMethod · 0.80

Calls 5

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

Tested by

no test coverage detected