| 2679 | #endif // NP_ENABLE_THREAD_CHECKS |
| 2680 | |
| 2681 | void NpScene::lockRead(const char* /*file*/, PxU32 /*line*/) |
| 2682 | { |
| 2683 | // increment this threads read depth |
| 2684 | ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth)); |
| 2685 | localCounts.readLockDepth++; |
| 2686 | TlsSetValue(mThreadReadWriteDepth, localCounts.getData()); |
| 2687 | |
| 2688 | // if we are the current writer then increment the reader count but don't actually lock (allow reading from threads with write ownership) |
| 2689 | if(localCounts.readLockDepth == 1) |
| 2690 | mRWLock.lockReader(mCurrentWriter != Thread::getId()); |
| 2691 | } |
| 2692 | |
| 2693 | void NpScene::unlockRead() |
| 2694 | { |
no test coverage detected