From 11cc232de52da06a1491545342a4417700f691ef Mon Sep 17 00:00:00 2001 From: Marco Casaroli Date: Wed, 7 Dec 2022 09:05:11 +0100 Subject: [PATCH] `pthread_mutex_timedlock` never returns `EINTR` According to posix spec, this function should never return `EINTR`. This fixes the call to `pthread_mutex_take` so it keeps retrying the lock and doesn't return `EINTR` --- sched/pthread/pthread_mutextimedlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sched/pthread/pthread_mutextimedlock.c b/sched/pthread/pthread_mutextimedlock.c index f25ad0b306..58a196cb3c 100644 --- a/sched/pthread/pthread_mutextimedlock.c +++ b/sched/pthread/pthread_mutextimedlock.c @@ -187,7 +187,7 @@ int pthread_mutex_timedlock(FAR pthread_mutex_t *mutex, * or default mutex. */ - ret = pthread_mutex_take(mutex, abs_timeout, true); + ret = pthread_mutex_take(mutex, abs_timeout, false); /* If we successfully obtained the semaphore, then indicate * that we own it.