Commit a86e8436 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #5240, small simplification

git-svn-id: file:///svn/toku/tokudb@45627 c7de825b-a66e-492c-adef-691d508d4ae1
parent dfd2c9d1
......@@ -107,12 +107,10 @@ static inline void rwlock_write_unlock(RWLOCK rwlock) {
assert(rwlock->reader == 0);
assert(rwlock->writer == 1);
rwlock->writer--;
if (rwlock->writer == 0) {
if (rwlock->want_write) {
toku_cond_signal(&rwlock->wait_write);
} else if (rwlock->want_read) {
toku_cond_broadcast(&rwlock->wait_read);
}
if (rwlock->want_write) {
toku_cond_signal(&rwlock->wait_write);
} else if (rwlock->want_read) {
toku_cond_broadcast(&rwlock->wait_read);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment