auto import from //depot/cupcake/@132589
This commit is contained in:
@@ -896,7 +896,6 @@ void ReadWriteLock::unlockForRead()
|
||||
{
|
||||
mLock.lock();
|
||||
if (mNumReaders == 0) {
|
||||
mLock.unlock();
|
||||
LOG(LOG_WARN, "thread",
|
||||
"WARNING: unlockForRead requested, but not locked\n");
|
||||
return;
|
||||
@@ -962,7 +961,6 @@ void ReadWriteLock::unlockForWrite()
|
||||
{
|
||||
mLock.lock();
|
||||
if (mNumWriters == 0) {
|
||||
mLock.unlock();
|
||||
LOG(LOG_WARN, "thread",
|
||||
"WARNING: unlockForWrite requested, but not locked\n");
|
||||
return;
|
||||
@@ -974,7 +972,7 @@ void ReadWriteLock::unlockForWrite()
|
||||
//printf(" wrlk held %.3f msec\n",
|
||||
// (double) mDebugTimer.durationUsecs() / 1000.0);
|
||||
#endif
|
||||
mWriteWaiter.signal(); // should other writers get first dibs?
|
||||
// mWriteWaiter.signal(); // should other writers get first dibs?
|
||||
//printf("+++ signaling readers (if any)\n");
|
||||
mReadWaiter.broadcast(); // wake all readers (if any)
|
||||
mLock.unlock();
|
||||
|
||||
Reference in New Issue
Block a user