Enable mutex fast path for sem_wait and nxsem_wait also when priority inheritance is enabled

This enables the mutex fast path for nxsem_wait, nxsem_trywait and nxsem_post also when
the priority inheritance is enabled.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
Jukka Laitinen
2025-04-10 13:41:46 +03:00
committed by Xiang Xiao
parent b6f2729730
commit ffb49a25fb
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -123,10 +123,10 @@ int nxsem_trywait(FAR sem_t *sem)
#ifndef CONFIG_LIBC_ARCH_ATOMIC
if ((sem->flags & SEM_TYPE_MUTEX)
#if defined(CONFIG_PRIORITY_PROTECT) || defined(CONFIG_PRIORITY_INHERITANCE)
&& (sem->flags & SEM_PRIO_MASK) == SEM_PRIO_NONE
#endif
if (NXSEM_IS_MUTEX(sem)
# ifdef CONFIG_PRIORITY_PROTECT
&& (sem->flags & SEM_PRIO_MASK) != SEM_PRIO_PROTECT
# endif
)
{
int32_t tid = _SCHED_GETTID();