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

Method unlockWrite

physx/source/physx/src/NpScene.cpp:2732–2751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2730}
2731
2732void NpScene::unlockWrite()
2733{
2734 // increment this thread's write depth
2735 ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth));
2736 if (localCounts.writeLockDepth < 1)
2737 {
2738 Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__, "PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.");
2739 return;
2740 }
2741 localCounts.writeLockDepth--;
2742 TlsSetValue(mThreadReadWriteDepth, localCounts.getData());
2743
2744 PX_ASSERT(mCurrentWriter == Thread::getId());
2745
2746 if (localCounts.writeLockDepth == 0)
2747 {
2748 mCurrentWriter = 0;
2749 mRWLock.unlockWriter();
2750 }
2751}
2752
2753PxReal NpScene::getWakeCounterResetValue() const
2754{

Callers 5

onTickPreRenderMethod · 0.80
onTickPreRenderMethod · 0.80
~PxSceneWriteLockMethod · 0.80
preSimMethod · 0.80
~ActorMethod · 0.80

Calls 5

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

Tested by

no test coverage detected