libc: nxmutex_clocklock abstime supports NULL pointer
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
01864d262c
commit
eee7cb6efa
@ -303,7 +303,14 @@ int nxmutex_clocklock(FAR mutex_t *mutex, clockid_t clockid,
|
||||
|
||||
do
|
||||
{
|
||||
ret = nxsem_clockwait(&mutex->sem, clockid, abstime);
|
||||
if (abstime)
|
||||
{
|
||||
ret = nxsem_clockwait(&mutex->sem, clockid, abstime);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = nxsem_wait(&mutex->sem);
|
||||
}
|
||||
}
|
||||
while (ret == -EINTR || ret == -ECANCELED);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user