rwlock trylock functions were wrongly returning EAGAIN instead of EBUSY

This commit is contained in:
Rich Felker
2011-03-08 12:19:30 -05:00
parent 7e6be42a77
commit e5dd18319b
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ int pthread_rwlock_tryrdlock(pthread_rwlock_t *rw)
a_dec(&rw->_rw_readers);
if (rw->_rw_waiters && !rw->_rw_readers)
__wake(&rw->_rw_readers, 1, 0);
return EAGAIN;
return EBUSY;
}
return 0;
}