[pthreads] Fix the sem_trywait issue.
This commit is contained in:
parent
712c0673fb
commit
2d7486fcc0
|
@ -362,7 +362,7 @@ int sem_trywait(sem_t *sem)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = rt_sem_take(sem->sem, RT_WAITING_FOREVER);
|
result = rt_sem_take(sem->sem, 0);
|
||||||
if (result == -RT_ETIMEOUT)
|
if (result == -RT_ETIMEOUT)
|
||||||
{
|
{
|
||||||
rt_set_errno(EAGAIN);
|
rt_set_errno(EAGAIN);
|
||||||
|
|
Loading…
Reference in New Issue