From b285782b29175fdf365b66d4bb448b7d215a5399 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 21 Aug 2001 23:10:37 +0000 Subject: [PATCH] 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. --- sys/kern/kern_synch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index e39ee45e3e7e..fa6c1500590f 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