Replace nxsem_timedwait_uninterruptible with nxsem_tickwait_uninterruptible

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-05-10 09:32:31 +08:00
committed by Petro Karashchenko
parent 816ce73ab4
commit 1fb8c13e5e
28 changed files with 168 additions and 667 deletions
+1 -17
View File
@@ -125,7 +125,6 @@ static int uartwriteconf(FAR const struct btuart_lowerhalf_s *lower,
int ret;
int gotlen = 0;
FAR uint8_t *din;
struct timespec abstime;
DEBUGASSERT(lower != NULL);
@@ -149,22 +148,7 @@ static int uartwriteconf(FAR const struct btuart_lowerhalf_s *lower,
din = kmm_malloc(maxl);
while (gotlen < maxl)
{
ret = clock_gettime(CLOCK_REALTIME, &abstime);
if (ret < 0)
{
goto exit_uartwriteconf;
}
/* Add the offset to the time in the future */
abstime.tv_nsec += NSEC_PER_SEC / 10;
if (abstime.tv_nsec >= NSEC_PER_SEC)
{
abstime.tv_nsec -= NSEC_PER_SEC;
abstime.tv_sec++;
}
ret = nxsem_timedwait_uninterruptible(rxsem, &abstime);
ret = nxsem_tickwait_uninterruptible(rxsem, MSEC2TICK(100));
if (ret < 0)
{
/* We didn't receive enough message, so fall out */