Skip to content

Commit 2016e42

Browse files
GaryOderNichtsfincs
authored andcommitted
wutnewlib: fix lock_try_acquire
1 parent afa43f6 commit 2016e42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/wutnewlib/wut_thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ __SYSCALL(lock_acquire)(_LOCK_T *lock)
9292
int
9393
__SYSCALL(lock_try_acquire)(_LOCK_T *lock)
9494
{
95-
return OSFastMutex_TryLock(__wut_get_mutex(lock));
95+
return OSFastMutex_TryLock(__wut_get_mutex(lock)) ? 0 : 1;
9696
}
9797

9898
void

0 commit comments

Comments
 (0)