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

Method stopWrite

deps/physx/physx/source/physx/src/NpScene.cpp:2661–2678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2659}
2660
2661void NpScene::stopWrite(bool allowReentry)
2662{
2663 if (!(mScene.getFlags() & PxSceneFlag::eREQUIRE_RW_LOCK))
2664 {
2665 Ps::atomicDecrement(&mConcurrentWriteCount);
2666
2667 // decrement depth of writes for this thread
2668 ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth));
2669
2670 // see comment in startWrite()
2671 if (allowReentry)
2672 localCounts.writeDepth--;
2673 else
2674 localCounts.writeDepth-=2;
2675
2676 TlsSetValue(mThreadReadWriteDepth, localCounts.getData());
2677 }
2678}
2679
2680bool NpScene::startRead() const
2681{

Callers 1

~NpWriteCheckMethod · 0.80

Calls 5

atomicDecrementFunction · 0.50
TlsGetValueFunction · 0.50
TlsSetValueFunction · 0.50
getFlagsMethod · 0.45
getDataMethod · 0.45

Tested by

no test coverage detected