diff options
author | jhb <jhb@FreeBSD.org> | 2001-08-21 23:10:37 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-08-21 23:10:37 +0000 |
commit | 88c481e3095f810cb89907a508859c5eb0b8c9e7 (patch) | |
tree | f5a83effc8bdc3599c47d069743ac0d0dc30d2b9 /sys/kern/kern_synch.c | |
parent | 6288c193137bf91669ae6f1f3e8fe9797510e549 (diff) | |
download | FreeBSD-src-88c481e3095f810cb89907a508859c5eb0b8c9e7.zip FreeBSD-src-88c481e3095f810cb89907a508859c5eb0b8c9e7.tar.gz |
Release the sched_lock before bombing out in mi_switch() via db_error().
This makes things slightly easier if you call a function that calls
mi_switch() as it keeps the locking before and after closer.
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r-- | sys/kern/kern_synch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index e39ee45..fa6c150 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -672,8 +672,10 @@ mi_switch() /* * Don't perform context switches from the debugger. */ - if (db_active) + if (db_active) { + mtx_unlock_spin(&sched_lock); db_error("Context switches not allowed in the debugger."); + } #endif #if 0 |