summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-03-01 22:51:44 +0000
committerjhb <jhb@FreeBSD.org>2016-03-01 22:51:44 +0000
commit58823d0b495fabfa74b326609295d68f71debcdb (patch)
tree594daf16afc719eb027714f76d686db82bab80b8
parente686de6d03323b5a29460ce889d438a710125c07 (diff)
downloadFreeBSD-src-58823d0b495fabfa74b326609295d68f71debcdb.zip
FreeBSD-src-58823d0b495fabfa74b326609295d68f71debcdb.tar.gz
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
-rw-r--r--sys/kern/kern_condvar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c
index 95a6d09..8061829 100644
--- a/sys/kern/kern_condvar.c
+++ b/sys/kern/kern_condvar.c
@@ -122,7 +122,7 @@ _cv_wait(struct cv *cvp, struct lock_object *lock)
"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 lock_object *lock)
("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_object *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 lock_object *lock, sbintime_t sbt,
"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, struct lock_object *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
OpenPOWER on IntegriCloud