svn commit: r227394 - in head/sys: amd64/amd64 i386/i386
Konstantin Belousov
kib at FreeBSD.org
Wed Nov 9 17:25:44 UTC 2011
Author: kib
Date: Wed Nov 9 17:25:43 2011
New Revision: 227394
URL: http://svn.freebsd.org/changeset/base/227394
Log:
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
Modified:
head/sys/amd64/amd64/machdep.c
head/sys/i386/i386/machdep.c
Modified: head/sys/amd64/amd64/machdep.c
==============================================================================
--- head/sys/amd64/amd64/machdep.c Wed Nov 9 17:15:51 2011 (r227393)
+++ head/sys/amd64/amd64/machdep.c Wed Nov 9 17:25:43 2011 (r227394)
@@ -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);
Modified: head/sys/i386/i386/machdep.c
==============================================================================
--- head/sys/i386/i386/machdep.c Wed Nov 9 17:15:51 2011 (r227393)
+++ head/sys/i386/i386/machdep.c Wed Nov 9 17:25:43 2011 (r227394)
@@ -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);
More information about the svn-src-all
mailing list