aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_switch.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2007-09-17 05:31:39 +0000
committerJeff Roberson <jeff@FreeBSD.org>2007-09-17 05:31:39 +0000
commitb61ce5b0e6aad0a00038c9c40f29a7de3646e3fe (patch)
treee572a7b77f24339d2dc6ebf6b83c1e2c1ce0f6a5 /sys/kern/kern_switch.c
parent0e8c5adf211ae3a5e3ab19d96ca3a01d03210125 (diff)
downloadsrc-b61ce5b0e6aad0a00038c9c40f29a7de3646e3fe.tar.gz
src-b61ce5b0e6aad0a00038c9c40f29a7de3646e3fe.zip
- 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)
Notes
Notes: svn path=/head/; revision=172207
Diffstat (limited to 'sys/kern/kern_switch.c')
-rw-r--r--sys/kern/kern_switch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c
index aa75dab9934a..e16e38ee9f62 100644
--- a/sys/kern/kern_switch.c
+++ b/sys/kern/kern_switch.c
@@ -558,8 +558,8 @@ runq_remove_idx(struct runq *rq, struct td_sched *ts, u_char *idx)
struct rqhead *rqh;
u_char pri;
- KASSERT(ts->ts_thread->td_proc->p_sflag & PS_INMEM,
- ("runq_remove_idx: process swapped out"));
+ KASSERT(ts->ts_thread->td_flags & TDF_INMEM,
+ ("runq_remove_idx: thread swapped out"));
pri = ts->ts_rqindex;
KASSERT(pri < RQ_NQS, ("runq_remove_idx: Invalid index %d\n", pri));
rqh = &rq->rq_queues[pri];