diff options
| author | Fenrir <[email protected]> | 2018-01-24 00:25:47 -0700 |
|---|---|---|
| committer | FenrirWolf <[email protected]> | 2018-01-25 00:26:32 -0700 |
| commit | f8aca7b2b1196b412692d5d2ffa59efb83af973c (patch) | |
| tree | b90d6e0732f5735215d74d74a483ebeb16f9f78d /ctr-std/src/sys | |
| parent | Initial rwlock impl (diff) | |
| download | ctru-rs-f8aca7b2b1196b412692d5d2ffa59efb83af973c.tar.xz ctru-rs-f8aca7b2b1196b412692d5d2ffa59efb83af973c.zip | |
Fix mutex try_lock logic
Wow, not sure how I messed that one up
Diffstat (limited to 'ctr-std/src/sys')
| -rw-r--r-- | ctr-std/src/sys/unix/mutex.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ctr-std/src/sys/unix/mutex.rs b/ctr-std/src/sys/unix/mutex.rs index 51e6b47..95c74a4 100644 --- a/ctr-std/src/sys/unix/mutex.rs +++ b/ctr-std/src/sys/unix/mutex.rs @@ -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 { #[inline] pub unsafe fn try_lock(&self) -> bool { match ::libctru::RecursiveLock_TryLock(self.inner.get()) { - 0 => true, - _ => false, + 0 => false, + _ => true, } } |