Stopped process may legitimately have some threads sleeping and not

suspended, if the sleep is uninterruptible.

Reported and tested by:	pho
MFC after:	1 week
This commit is contained in:
kib 2011-11-09 17:25:43 +00:00
parent 245b059405
commit 969e95a9f7
2 changed files with 4 additions and 2 deletions

View File

@ -2047,7 +2047,8 @@ int
fill_fpregs(struct thread *td, struct fpreg *fpregs)
{
KASSERT(td == curthread || TD_IS_SUSPENDED(td),
KASSERT(td == curthread || TD_IS_SUSPENDED(td) ||
(P_SHOULDSTOP(td->td_proc) && TD_IS_SLEEPING(td)),
("not suspended thread %p", td));
fpugetregs(td);
fill_fpregs_xmm(&td->td_pcb->pcb_user_save, fpregs);

View File

@ -3299,7 +3299,8 @@ int
fill_fpregs(struct thread *td, struct fpreg *fpregs)
{
KASSERT(td == curthread || TD_IS_SUSPENDED(td),
KASSERT(td == curthread || TD_IS_SUSPENDED(td) ||
(P_SHOULDSTOP(td->td_proc) && TD_IS_SLEEPING(td)),
("not suspended thread %p", td));
#ifdef DEV_NPX
npxgetregs(td);