| 2729 | #endif // NP_ENABLE_THREAD_CHECKS |
| 2730 | |
| 2731 | void NpScene::lockRead(const char* /*file*/, PxU32 /*line*/) |
| 2732 | { |
| 2733 | // increment this threads read depth |
| 2734 | ThreadReadWriteCount localCounts (TlsGetValue(mThreadReadWriteDepth)); |
| 2735 | localCounts.readLockDepth++; |
| 2736 | TlsSetValue(mThreadReadWriteDepth, localCounts.getData()); |
| 2737 | |
| 2738 | // if we are the current writer then increment the reader count but don't actually lock (allow reading from threads with write ownership) |
| 2739 | if(localCounts.readLockDepth == 1) |
| 2740 | mRWLock.lockReader(mCurrentWriter != Thread::getId()); |
| 2741 | } |
| 2742 | |
| 2743 | void NpScene::unlockRead() |
| 2744 | { |
no test coverage detected