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

Method stopWrite

physx/source/physx/src/NpScene.cpp:2611–2628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2609}
2610
2611void NpScene::stopWrite(bool allowReentry)
2612{
2613 if (!(mScene.getFlags() & PxSceneFlag::eREQUIRE_RW_LOCK))
2614 {
2615 Ps::atomicDecrement(&mConcurrentWriteCount);
2616
2617 // decrement depth of writes for this thread
2618 ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth));
2619
2620 // see comment in startWrite()
2621 if (allowReentry)
2622 localCounts.writeDepth--;
2623 else
2624 localCounts.writeDepth-=2;
2625
2626 TlsSetValue(mThreadReadWriteDepth, localCounts.getData());
2627 }
2628}
2629
2630bool NpScene::startRead() const
2631{

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