aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/sched.h
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2016-05-25 09:04:06 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2016-05-25 09:04:06 +0000
commit8571421886a38cc7775218cb28e826f5d04d0a6d (patch)
treeb5692322399cbb88c01e1d6789f5a87750374cfb /sys/compat/linuxkpi/common/include/linux/sched.h
parentdbd2ee46b20d41ba7bc82b0bd541bba9302a96ba (diff)
downloadsrc-8571421886a38cc7775218cb28e826f5d04d0a6d.tar.gz
src-8571421886a38cc7775218cb28e826f5d04d0a6d.zip
Add checks for SCHEDULER_STOPPED() so that code using the LinuxKPI can
run after a panic(). This for example allows a LinuxKPI based graphics stack to receive prints during a panic. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=300671
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/sched.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h
index bdaf7ae070f3..c9f2a399904e 100644
--- a/sys/compat/linuxkpi/common/include/linux/sched.h
+++ b/sys/compat/linuxkpi/common/include/linux/sched.h
@@ -91,7 +91,7 @@ CTASSERT(sizeof(((struct thread *)0)->td_retval[1]) >= sizeof(uintptr_t));
do { \
void *c; \
\
- if (cold) \
+ if (cold || SCHEDULER_STOPPED()) \
break; \
c = curthread; \
sleepq_lock(c); \