mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 09:12:44 +00:00
MFC r279326:
Use pthread_mutex_trylock(3) to implement mtx_trylock(3).
This commit is contained in:
parent
6ebf6f59dc
commit
5982e1b66f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=279632
@ -96,7 +96,7 @@ int
|
||||
mtx_trylock(mtx_t *mtx)
|
||||
{
|
||||
|
||||
switch (pthread_mutex_lock(mtx)) {
|
||||
switch (pthread_mutex_trylock(mtx)) {
|
||||
case 0:
|
||||
return (thrd_success);
|
||||
case EBUSY:
|
||||
|
Loading…
Reference in New Issue
Block a user