From b61ce5b0e6aad0a00038c9c40f29a7de3646e3fe Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Mon, 17 Sep 2007 05:31:39 +0000 Subject: - Move all of the PS_ flags into either p_flag or td_flags. - p_sflag was mostly protected by PROC_LOCK rather than the PROC_SLOCK or previously the sched_lock. These bugs have existed for some time. - Allow swapout to try each thread in a process individually and then swapin the whole process if any of these fail. This allows us to move most scheduler related swap flags into td_flags. - Keep ki_sflag for backwards compat but change all in source tools to use the new and more correct location of P_INMEM. Reported by: pho Reviewed by: attilio, kib Approved by: re (kensmith) --- sys/kern/kern_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/kern_thread.c') diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index f12e724f9ae6..a8a35813c3dc 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -531,7 +531,7 @@ thread_link(struct thread *td, struct proc *p) */ td->td_state = TDS_INACTIVE; td->td_proc = p; - td->td_flags = 0; + td->td_flags = TDF_INMEM; LIST_INIT(&td->td_contested); sigqueue_init(&td->td_sigqueue, p); -- cgit v1.2.3