diff --git a/sched/pthread/pthread_mutex.c b/sched/pthread/pthread_mutex.c index 3bd5e62c9c9..7a790d3abb2 100644 --- a/sched/pthread/pthread_mutex.c +++ b/sched/pthread/pthread_mutex.c @@ -372,7 +372,7 @@ void pthread_mutex_inconsistent(FAR struct tcb_s *tcb) DEBUGASSERT(tcb != NULL); - flags = spin_lock_irqsave(&tcb->mhead_lock); + flags = spin_lock_irqsave_nopreempt(&tcb->mhead_lock); /* Remove and process each mutex held by this task */ @@ -390,5 +390,5 @@ void pthread_mutex_inconsistent(FAR struct tcb_s *tcb) mutex_unlock(&mutex->mutex); } - spin_unlock_irqrestore(&tcb->mhead_lock, flags); + spin_unlock_irqrestore_nopreempt(&tcb->mhead_lock, flags); }