summaryrefslogtreecommitdiffstats
path: root/sys/compat/linuxkpi/common/include/linux/wait.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/wait.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/wait.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/wait.h b/sys/compat/linuxkpi/common/include/linux/wait.h
index 8afea08..9624c84 100644
--- a/sys/compat/linuxkpi/common/include/linux/wait.h
+++ b/sys/compat/linuxkpi/common/include/linux/wait.h
@@ -31,6 +31,7 @@
#ifndef _LINUX_WAIT_H_
#define _LINUX_WAIT_H_
+#include <linux/compiler.h>
#include <linux/spinlock.h>
#include <linux/sched.h>
#include <linux/list.h>
@@ -81,6 +82,8 @@ do { \
void *c = &(q).wchan; \
if (!(cond)) { \
for (;;) { \
+ if (unlikely(SCHEDULER_STOPPED())) \
+ break; \
sleepq_lock(c); \
if (cond) { \
sleepq_release(c); \
@@ -100,6 +103,8 @@ do { \
_error = 0; \
if (!(cond)) { \
for (; _error == 0;) { \
+ if (unlikely(SCHEDULER_STOPPED())) \
+ break; \
sleepq_lock(c); \
if (cond) { \
sleepq_release(c); \
@@ -123,6 +128,8 @@ do { \
\
if (!(cond)) { \
for (; __rc == 0;) { \
+ if (unlikely(SCHEDULER_STOPPED())) \
+ break; \
sleepq_lock(c); \
if (cond) { \
sleepq_release(c); \
OpenPOWER on IntegriCloud