Skip to content

Commit

Permalink
Auto merge of #65228 - Wind-River:real_master, r=dtolnay
Browse files Browse the repository at this point in the history
vxworks: add checking (r == 0)
  • Loading branch information
bors committed Oct 9, 2019
2 parents 321ccbe + 175db95 commit 20cc752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/sys/vxworks/rwlock.rs
Expand Up @@ -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();
}
Expand Down

0 comments on commit 20cc752

Please sign in to comment.