From 1b16b181d12075ffc084f2a593e16fe3dd8f6f6d Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 2 Jul 2004 19:09:50 +0000 Subject: - Change mi_switch() and sched_switch() to accept an optional thread to switch to. If a non-NULL thread pointer is passed in, then the CPU will switch to that thread directly rather than calling choosethread() to pick a thread to choose to. - Make sched_switch() aware of idle threads and know to do TD_SET_CAN_RUN() instead of sticking them on the run queue rather than requiring all callers of mi_switch() to know to do this if they can be called from an idlethread. - Move constants for arguments to mi_switch() and thread_single() out of the middle of the function prototypes and up above into their own section. --- sys/kern/kern_sig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/kern_sig.c') diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index e3466a9..d17cbe2 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2019,7 +2019,7 @@ ptracestop(struct thread *td, int sig) thread_suspend_one(td); PROC_UNLOCK(p); DROP_GIANT(); - mi_switch(SW_INVOL); + mi_switch(SW_INVOL, NULL); mtx_unlock_spin(&sched_lock); PICKUP_GIANT(); } @@ -2168,7 +2168,7 @@ issignal(td) thread_suspend_one(td); PROC_UNLOCK(p); DROP_GIANT(); - mi_switch(SW_INVOL); + mi_switch(SW_INVOL, NULL); mtx_unlock_spin(&sched_lock); PICKUP_GIANT(); PROC_LOCK(p); -- cgit v1.1