From dbcba89131b58b7216efb8356da2adfc1a788cb7 Mon Sep 17 00:00:00 2001 From: hselasky Date: Wed, 25 May 2016 09:04:06 +0000 Subject: 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 --- sys/compat/linuxkpi/common/include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/compat/linuxkpi/common/include/linux/sched.h') diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h index bdaf7ae..c9f2a39 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); \ -- cgit v1.1