| 2730 | } |
| 2731 | |
| 2732 | void 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 | |
| 2753 | PxReal NpScene::getWakeCounterResetValue() const |
| 2754 | { |
no test coverage detected