Commit on behalf of Dmitry Lenev.

Merge his patch for Bug#52044 into 5.5, and apply 
review comments.
This commit is contained in:
Konstantin Osipov 2010-08-12 17:50:23 +04:00
commit 29c4873ad5
27 changed files with 1265 additions and 367 deletions

View file

@ -127,7 +127,7 @@ int my_rw_wrlock(my_rw_lock_t *rwp)
pthread_mutex_lock(&rwp->lock);
rwp->waiters++; /* another writer queued */
my_rw_lock_assert_not_owner(rwp);
my_rw_lock_assert_not_write_owner(rwp);
while (rwp->state)
pthread_cond_wait(&rwp->writers, &rwp->lock);