| 2691 | } |
| 2692 | |
| 2693 | void NpScene::unlockRead() |
| 2694 | { |
| 2695 | // increment this threads read depth |
| 2696 | ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth)); |
| 2697 | if(localCounts.readLockDepth < 1) |
| 2698 | { |
| 2699 | Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__, "PxScene::unlockRead() called without matching call to PxScene::lockRead(), behaviour will be undefined."); |
| 2700 | return; |
| 2701 | } |
| 2702 | localCounts.readLockDepth--; |
| 2703 | TlsSetValue(mThreadReadWriteDepth, localCounts.getData()); |
| 2704 | |
| 2705 | // only unlock on last read |
| 2706 | if(localCounts.readLockDepth == 0) |
| 2707 | mRWLock.unlockReader(); |
| 2708 | } |
| 2709 | |
| 2710 | void NpScene::lockWrite(const char* file, PxU32 line) |
| 2711 | { |
no test coverage detected