diff --git a/lib/libkse/thread/thr_mutex.c b/lib/libkse/thread/thr_mutex.c index 7e8de44f8956..00da0f0270bb 100644 --- a/lib/libkse/thread/thr_mutex.c +++ b/lib/libkse/thread/thr_mutex.c @@ -1008,6 +1008,7 @@ mutex_unlock_common(pthread_mutex_t *m, int add_reference) * This thread now owns one less priority mutex. */ curthread->priority_mutex_count--; + THR_SCHED_UNLOCK(curthread, curthread); /* Remove the mutex from the threads queue. */ MUTEX_ASSERT_IS_OWNED(*m); diff --git a/lib/libpthread/thread/thr_mutex.c b/lib/libpthread/thread/thr_mutex.c index 7e8de44f8956..00da0f0270bb 100644 --- a/lib/libpthread/thread/thr_mutex.c +++ b/lib/libpthread/thread/thr_mutex.c @@ -1008,6 +1008,7 @@ mutex_unlock_common(pthread_mutex_t *m, int add_reference) * This thread now owns one less priority mutex. */ curthread->priority_mutex_count--; + THR_SCHED_UNLOCK(curthread, curthread); /* Remove the mutex from the threads queue. */ MUTEX_ASSERT_IS_OWNED(*m);