Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions sched/semaphore/sem_holder.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,12 +942,13 @@ void nxsem_add_holder_tcb(FAR struct tcb_s *htcb, FAR sem_t *sem)
{
FAR struct semholder_s *pholder;

/* If priority inheritance is disabled for this thread, then do not add
* the holder. If there are never holders of the semaphore, the priority
/* If priority inheritance is disabled for this thread or it is IDLE hread,
* then do not add the holder.
* If there are never holders of the semaphore, the priority
* inheritance is effectively disabled.
*/

if ((sem->flags & PRIOINHERIT_FLAGS_DISABLE) == 0)
if (htcb->flink != NULL && (sem->flags & PRIOINHERIT_FLAGS_DISABLE) == 0)
{
/* Find or allocate a container for this new holder */

Expand Down