mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
Auto merge of #65228 - Wind-River:real_master, r=dtolnay
vxworks: add checking (r == 0)
This commit is contained in:
commit
20cc752726
@ -25,7 +25,7 @@ impl RWLock {
|
||||
let r = libc::pthread_rwlock_rdlock(self.inner.get());
|
||||
if r == libc::EAGAIN {
|
||||
panic!("rwlock maximum reader count exceeded");
|
||||
} else if r == libc::EDEADLK || *self.write_locked.get() {
|
||||
} else if r == libc::EDEADLK || (r == 0 && *self.write_locked.get()) {
|
||||
if r == 0 {
|
||||
self.raw_unlock();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user