libc: nxmutex_clocklock abstime supports NULL pointer
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
01864d262c
commit
eee7cb6efa
@ -302,9 +302,16 @@ int nxmutex_clocklock(FAR mutex_t *mutex, clockid_t clockid,
|
||||
/* Wait until we get the lock or until the timeout expires */
|
||||
|
||||
do
|
||||
{
|
||||
if (abstime)
|
||||
{
|
||||
ret = nxsem_clockwait(&mutex->sem, clockid, abstime);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = nxsem_wait(&mutex->sem);
|
||||
}
|
||||
}
|
||||
while (ret == -EINTR || ret == -ECANCELED);
|
||||
|
||||
if (ret >= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user