diff options
author | julian <julian@FreeBSD.org> | 2002-09-29 23:23:25 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-09-29 23:23:25 +0000 |
commit | bac3b741a4e6fa8dd3e50a2a68c0519efc2fe0a7 (patch) | |
tree | c38743ad59bf7d46ec06dfa90d96b9885c368d59 /sys/kern | |
parent | 6494921c8b59bbb533f266b76c0945ba8b504d45 (diff) | |
download | FreeBSD-src-bac3b741a4e6fa8dd3e50a2a68c0519efc2fe0a7.zip FreeBSD-src-bac3b741a4e6fa8dd3e50a2a68c0519efc2fe0a7.tar.gz |
commit the version I actually tested..
Submitted by: davidxu
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_mutex.c | 6 | ||||
-rw-r--r-- | sys/kern/subr_turnstile.c | 6 |
2 files changed, 8 insertions, 4 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 diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index a5053fe..935ac79 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.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 |