summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-07-29 18:33:32 +0000
committerjulian <julian@FreeBSD.org>2002-07-29 18:33:32 +0000
commit6216c4b163409794825c784e02317143975376f3 (patch)
treefb17cadef050bebf8077e451640f625b2317869b /sys/fs
parent9f0ddc464e0c402f25ea8ae47e53ae9dba1c60c6 (diff)
downloadFreeBSD-src-6216c4b163409794825c784e02317143975376f3.zip
FreeBSD-src-6216c4b163409794825c784e02317143975376f3.tar.gz
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 <tanimura@r.dl.itc.u-tokyo.ac.jp>
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/procfs/procfs_ctl.c2
1 files changed, 2 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud