From 6216c4b163409794825c784e02317143975376f3 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 29 Jul 2002 18:33:32 +0000 Subject: Create a new thread state to describe threads that would be ready to run except for the fact tha they are presently swapped out. Also add a process flag to indicate that the process has started the struggle to swap back in. This will be needed for the case where multiple threads start the swapin action top a collision. Also add code to stop a process fropm being swapped out if one of the threads in this process is actually off running on another CPU.. that might hurt... Submitted by: Seigo Tanimura --- sys/fs/procfs/procfs_ctl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/fs/procfs') diff --git a/sys/fs/procfs/procfs_ctl.c b/sys/fs/procfs/procfs_ctl.c index 15ed718..88ce6dd 100644 --- a/sys/fs/procfs/procfs_ctl.c +++ b/sys/fs/procfs/procfs_ctl.c @@ -144,7 +144,9 @@ procfs_control(struct thread *td, struct proc *p, int op) * Stop the target. */ p->p_flag |= P_TRACED; + mtx_lock_spin(&sched_lock); faultin(p); + mtx_unlock_spin(&sched_lock); p->p_xstat = 0; /* XXX ? */ if (p->p_pptr != td->td_proc) { p->p_oppid = p->p_pptr->p_pid; -- cgit v1.1