| 2780 | } |
| 2781 | |
| 2782 | void NpScene::unlockWrite() |
| 2783 | { |
| 2784 | // increment this thread's write depth |
| 2785 | ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth)); |
| 2786 | if (localCounts.writeLockDepth < 1) |
| 2787 | { |
| 2788 | Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__, "PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined."); |
| 2789 | return; |
| 2790 | } |
| 2791 | localCounts.writeLockDepth--; |
| 2792 | TlsSetValue(mThreadReadWriteDepth, localCounts.getData()); |
| 2793 | |
| 2794 | PX_ASSERT(mCurrentWriter == Thread::getId()); |
| 2795 | |
| 2796 | if (localCounts.writeLockDepth == 0) |
| 2797 | { |
| 2798 | mCurrentWriter = 0; |
| 2799 | mRWLock.unlockWriter(); |
| 2800 | } |
| 2801 | } |
| 2802 | |
| 2803 | PxReal NpScene::getWakeCounterResetValue() const |
| 2804 | { |
no test coverage detected