diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2003-04-23 18:46:51 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2003-04-23 18:46:51 +0000 |
| commit | 112afcb232ba371d79e63b19da46593e8a55639c (patch) | |
| tree | 5c78b6b61269a52d4ec630fce94d68d022ec3511 /sys/kern/kern_synch.c | |
| parent | 79db6ff316594d4824b278a3e3186fae7398b9bc (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_synch.c')
| -rw-r--r-- | sys/kern/kern_synch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index b582e2027441..9d19f13e0830 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -167,6 +167,7 @@ msleep(ident, mtx, priority, wmesg, timo) * the thread (recursion here might be bad). * Hence the TDF_INMSLEEP flag. */ + mtx_lock_spin(&sched_lock); if (p->p_flag & P_THREADED || p->p_numthreads > 1) { /* * Just don't bother if we are exiting @@ -177,10 +178,10 @@ msleep(ident, mtx, priority, wmesg, timo) (((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) || (td->td_flags & TDF_INTERRUPT))) { td->td_flags &= ~TDF_INTERRUPT; + mtx_unlock_spin(&sched_lock); return (EINTR); } } - mtx_lock_spin(&sched_lock); if (cold ) { /* * During autoconfiguration, just give interrupts |
