Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jan 2012 18:59:35 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r229187 - in stable/8/sys: amd64/amd64 i386/i386
Message-ID:  <201201011859.q01IxZSM025979@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Jan  1 18:59:35 2012
New Revision: 229187
URL: http://svn.freebsd.org/changeset/base/229187

Log:
  MFC r227394:
  Stopped process may legitimately have some threads sleeping and not
  suspended, if the sleep is uninterruptible.
  
  MFC r227442:
  Weaken the part of assertions added in the r227394. Only check that the
  process state is stopped.

Modified:
  stable/8/sys/amd64/amd64/machdep.c
  stable/8/sys/i386/i386/machdep.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/amd64/amd64/machdep.c
==============================================================================
--- stable/8/sys/amd64/amd64/machdep.c	Sun Jan  1 18:54:29 2012	(r229186)
+++ stable/8/sys/amd64/amd64/machdep.c	Sun Jan  1 18:59:35 2012	(r229187)
@@ -1986,7 +1986,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),
 	    ("not suspended thread %p", td));
 	fpugetregs(td);
 	fill_fpregs_xmm(&td->td_pcb->pcb_user_save, fpregs);

Modified: stable/8/sys/i386/i386/machdep.c
==============================================================================
--- stable/8/sys/i386/i386/machdep.c	Sun Jan  1 18:54:29 2012	(r229186)
+++ stable/8/sys/i386/i386/machdep.c	Sun Jan  1 18:59:35 2012	(r229187)
@@ -3220,7 +3220,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),
 	    ("not suspended thread %p", td));
 #ifdef DEV_NPX
 	npxgetregs(td);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201011859.q01IxZSM025979>