Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Mar 2016 22:51:45 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296283 - head/sys/kern
Message-ID:  <201603012251.u21MpjCt055249@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Mar  1 22:51:44 2016
New Revision: 296283
URL: https://svnweb.freebsd.org/changeset/base/296283

Log:
  Use SCHEDULER_STOPPED() in cv_*wait*() instead of checking panicstr.
  
  Reviewed by:	kib
  MFC after:	1 month
  Sponsored by:	Netflix
  Differential Revision:	https://reviews.freebsd.org/D5516

Modified:
  head/sys/kern/kern_condvar.c

Modified: head/sys/kern/kern_condvar.c
==============================================================================
--- head/sys/kern/kern_condvar.c	Tue Mar  1 22:25:54 2016	(r296282)
+++ head/sys/kern/kern_condvar.c	Tue Mar  1 22:51:44 2016	(r296283)
@@ -122,7 +122,7 @@ _cv_wait(struct cv *cvp, struct lock_obj
 	    "Waiting on \"%s\"", cvp->cv_description);
 	class = LOCK_CLASS(lock);
 
-	if (cold || panicstr) {
+	if (cold || SCHEDULER_STOPPED()) {
 		/*
 		 * During autoconfiguration, just give interrupts
 		 * a chance, then just return.  Don't run any other
@@ -183,7 +183,7 @@ _cv_wait_unlock(struct cv *cvp, struct l
 	    ("cv_wait_unlock cannot be used with Giant"));
 	class = LOCK_CLASS(lock);
 
-	if (cold || panicstr) {
+	if (cold || SCHEDULER_STOPPED()) {
 		/*
 		 * During autoconfiguration, just give interrupts
 		 * a chance, then just return.  Don't run any other
@@ -240,7 +240,7 @@ _cv_wait_sig(struct cv *cvp, struct lock
 	    "Waiting on \"%s\"", cvp->cv_description);
 	class = LOCK_CLASS(lock);
 
-	if (cold || panicstr) {
+	if (cold || SCHEDULER_STOPPED()) {
 		/*
 		 * After a panic, or during autoconfiguration, just give
 		 * interrupts a chance, then just return; don't run any other
@@ -307,7 +307,7 @@ _cv_timedwait_sbt(struct cv *cvp, struct
 	    "Waiting on \"%s\"", cvp->cv_description);
 	class = LOCK_CLASS(lock);
 
-	if (cold || panicstr) {
+	if (cold || SCHEDULER_STOPPED()) {
 		/*
 		 * After a panic, or during autoconfiguration, just give
 		 * interrupts a chance, then just return; don't run any other
@@ -376,7 +376,7 @@ _cv_timedwait_sig_sbt(struct cv *cvp, st
 	    "Waiting on \"%s\"", cvp->cv_description);
 	class = LOCK_CLASS(lock);
 
-	if (cold || panicstr) {
+	if (cold || SCHEDULER_STOPPED()) {
 		/*
 		 * After a panic, or during autoconfiguration, just give
 		 * interrupts a chance, then just return; don't run any other



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