Skip to content

Commit 20cc752

Browse files
committed
Auto merge of rust-lang#65228 - Wind-River:real_master, r=dtolnay
vxworks: add checking (r == 0)
2 parents 321ccbe + 175db95 commit 20cc752

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/sys/vxworks/rwlock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl RWLock {
2525
let r = libc::pthread_rwlock_rdlock(self.inner.get());
2626
if r == libc::EAGAIN {
2727
panic!("rwlock maximum reader count exceeded");
28-
} else if r == libc::EDEADLK || *self.write_locked.get() {
28+
} else if r == libc::EDEADLK || (r == 0 && *self.write_locked.get()) {
2929
if r == 0 {
3030
self.raw_unlock();
3131
}

0 commit comments

Comments
 (0)