summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r--sys/kern/kern_mutex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index a5053fe..935ac79 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -762,8 +762,10 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line)
td1->td_blocked = NULL;
TD_CLR_MUTEX(td1);
- if (TD_CAN_RUN(td1))
- setrunqueue(td1);
+ if (!TD_CAN_RUN(td1)) {
+ mtx_unlock_spin(&sched_lock);
+ return;
+ }
if (td->td_critnest == 1 && td1->td_priority < pri) {
#ifdef notyet
OpenPOWER on IntegriCloud