summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/usb/usb_transfer.c1
-rw-r--r--sys/geom/geom_bsd.c1
-rw-r--r--sys/geom/geom_mbr.c1
-rw-r--r--sys/geom/geom_pc98.c1
-rw-r--r--sys/geom/mountver/g_mountver.c1
-rw-r--r--sys/kern/kern_shutdown.c3
-rw-r--r--sys/sys/proc.h1
-rw-r--r--sys/sys/systm.h3
8 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/usb/usb_transfer.c b/sys/dev/usb/usb_transfer.c
index 4a5cfbd..e948299 100644
--- a/sys/dev/usb/usb_transfer.c
+++ b/sys/dev/usb/usb_transfer.c
@@ -42,6 +42,7 @@
#include <sys/callout.h>
#include <sys/malloc.h>
#include <sys/priv.h>
+#include <sys/proc.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c
index 60fc50c..5742509f 100644
--- a/sys/geom/geom_bsd.c
+++ b/sys/geom/geom_bsd.c
@@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$");
#include <sys/errno.h>
#include <sys/disklabel.h>
#include <sys/gpt.h>
+#include <sys/proc.h>
#include <sys/sbuf.h>
#include <sys/uuid.h>
#include <geom/geom.h>
diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c
index 6a736a7..42a9c8e 100644
--- a/sys/geom/geom_mbr.c
+++ b/sys/geom/geom_mbr.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/md5.h>
+#include <sys/proc.h>
#include <sys/diskmbr.h>
#include <sys/sbuf.h>
diff --git a/sys/geom/geom_pc98.c b/sys/geom/geom_pc98.c
index 71c194d..8e14f09 100644
--- a/sys/geom/geom_pc98.c
+++ b/sys/geom/geom_pc98.c
@@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
#include <sys/bio.h>
#include <sys/lock.h>
#include <sys/mutex.h>
+#include <sys/proc.h>
#include <sys/sbuf.h>
#include <sys/diskpc98.h>
diff --git a/sys/geom/mountver/g_mountver.c b/sys/geom/mountver/g_mountver.c
index 30af511..37cb924 100644
--- a/sys/geom/mountver/g_mountver.c
+++ b/sys/geom/mountver/g_mountver.c
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/bio.h>
#include <sys/disk.h>
+#include <sys/proc.h>
#include <sys/sbuf.h>
#include <sys/sysctl.h>
#include <sys/malloc.h>
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 55c77c4..9da342d 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -145,7 +145,6 @@ SYSCTL_INT(_kern_shutdown, OID_AUTO, show_busybufs, CTLFLAG_RW,
*/
const char *panicstr;
-int stop_scheduler; /* system stopped CPUs for panic */
int dumping; /* system is dumping */
int rebooting; /* system is rebooting */
static struct dumperinfo dumper; /* our selected dumper */
@@ -597,7 +596,7 @@ panic(const char *fmt, ...)
* stop_scheduler_on_panic is true, then stop_scheduler will
* always be set. Even if panic has been entered from kdb.
*/
- stop_scheduler = 1;
+ td->td_stopsched = 1;
}
#endif
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index ba00a88..76f3355 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -235,6 +235,7 @@ struct thread {
short td_locks; /* (k) Count of non-spin locks. */
short td_rw_rlocks; /* (k) Count of rwlock read locks. */
short td_lk_slocks; /* (k) Count of lockmgr shared locks. */
+ short td_stopsched; /* (k) Scheduler stopped. */
struct turnstile *td_blocked; /* (t) Lock thread is blocked on. */
const char *td_lockname; /* (t) Name of lock blocked on. */
LIST_HEAD(, turnstile) td_contested; /* (q) Contested locks. */
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index e5d60d4..47b974a 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -47,7 +47,6 @@
extern int cold; /* nonzero if we are doing a cold boot */
extern int rebooting; /* kern_reboot() has been called. */
-extern int stop_scheduler; /* only one thread runs after panic */
extern const char *panicstr; /* panic message */
extern char version[]; /* system version */
extern char copyright[]; /* system copyright */
@@ -113,7 +112,7 @@ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN };
* Otherwise, the kernel will deadlock since the scheduler isn't
* going to run the thread that holds any lock we need.
*/
-#define SCHEDULER_STOPPED() __predict_false(stop_scheduler)
+#define SCHEDULER_STOPPED() __predict_false(curthread->td_stopsched)
/*
* XXX the hints declarations are even more misplaced than most declarations
OpenPOWER on IntegriCloud