We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 321ccbe + 175db95 commit 20cc752Copy full SHA for 20cc752
src/libstd/sys/vxworks/rwlock.rs
@@ -25,7 +25,7 @@ impl RWLock {
25
let r = libc::pthread_rwlock_rdlock(self.inner.get());
26
if r == libc::EAGAIN {
27
panic!("rwlock maximum reader count exceeded");
28
- } else if r == libc::EDEADLK || *self.write_locked.get() {
+ } else if r == libc::EDEADLK || (r == 0 && *self.write_locked.get()) {
29
if r == 0 {
30
self.raw_unlock();
31
}
0 commit comments