| 2741 | } |
| 2742 | |
| 2743 | void NpScene::unlockRead() |
| 2744 | { |
| 2745 | // increment this threads read depth |
| 2746 | ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth)); |
| 2747 | if(localCounts.readLockDepth < 1) |
| 2748 | { |
| 2749 | Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__, "PxScene::unlockRead() called without matching call to PxScene::lockRead(), behaviour will be undefined."); |
| 2750 | return; |
| 2751 | } |
| 2752 | localCounts.readLockDepth--; |
| 2753 | TlsSetValue(mThreadReadWriteDepth, localCounts.getData()); |
| 2754 | |
| 2755 | // only unlock on last read |
| 2756 | if(localCounts.readLockDepth == 0) |
| 2757 | mRWLock.unlockReader(); |
| 2758 | } |
| 2759 | |
| 2760 | void NpScene::lockWrite(const char* file, PxU32 line) |
| 2761 | { |
no test coverage detected