Browse Source

Fix mutex try_lock logic

Wow, not sure how I messed that one up
pull/10/head
Fenrir 7 years ago committed by FenrirWolf
parent
commit
f8aca7b2b1
  1. 8
      ctr-std/src/sys/unix/mutex.rs

8
ctr-std/src/sys/unix/mutex.rs

@ -46,8 +46,8 @@ impl Mutex { @@ -46,8 +46,8 @@ impl Mutex {
#[inline]
pub unsafe fn try_lock(&self) -> bool {
match ::libctru::LightLock_TryLock(self.inner.get()) {
0 => true,
_ => false,
0 => false,
_ => true,
}
}
@ -77,8 +77,8 @@ impl ReentrantMutex { @@ -77,8 +77,8 @@ impl ReentrantMutex {
#[inline]
pub unsafe fn try_lock(&self) -> bool {
match ::libctru::RecursiveLock_TryLock(self.inner.get()) {
0 => true,
_ => false,
0 => false,
_ => true,
}
}

Loading…
Cancel
Save