summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2000-11-11 22:20:36 +0000
committerdeischen <deischen@FreeBSD.org>2000-11-11 22:20:36 +0000
commita7772ecabd99e13657fa840644a2aecfc02d6d44 (patch)
tree2ce4b6f36fe48fc1dcb7cbe7a4d7a347a0af9816 /lib
parent8fee57f7e707c21b2169572249b900ab5429f539 (diff)
downloadFreeBSD-src-a7772ecabd99e13657fa840644a2aecfc02d6d44.zip
FreeBSD-src-a7772ecabd99e13657fa840644a2aecfc02d6d44.tar.gz
Correct the logic for checking the emptiness of the waiting queue.
This fixes a potential problem where the file descriptors would not be polled causing waiting threads to stay waiting. Doh! MFC candidate.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc_r/uthread/uthread_kern.c2
-rw-r--r--lib/libkse/thread/thr_kern.c2
-rw-r--r--lib/libpthread/thread/thr_kern.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc_r/uthread/uthread_kern.c b/lib/libc_r/uthread/uthread_kern.c
index 67844e1..4d92385 100644
--- a/lib/libc_r/uthread/uthread_kern.c
+++ b/lib/libc_r/uthread/uthread_kern.c
@@ -323,7 +323,7 @@ _thread_kern_scheduler(void)
* Avoid polling file descriptors if there are none
* waiting:
*/
- if (TAILQ_EMPTY(&_workq) == 0) {
+ if (TAILQ_EMPTY(&_workq) != 0) {
}
/*
* Poll file descriptors only if a new scheduling signal
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c
index 67844e1..4d92385 100644
--- a/lib/libkse/thread/thr_kern.c
+++ b/lib/libkse/thread/thr_kern.c
@@ -323,7 +323,7 @@ _thread_kern_scheduler(void)
* Avoid polling file descriptors if there are none
* waiting:
*/
- if (TAILQ_EMPTY(&_workq) == 0) {
+ if (TAILQ_EMPTY(&_workq) != 0) {
}
/*
* Poll file descriptors only if a new scheduling signal
diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c
index 67844e1..4d92385 100644
--- a/lib/libpthread/thread/thr_kern.c
+++ b/lib/libpthread/thread/thr_kern.c
@@ -323,7 +323,7 @@ _thread_kern_scheduler(void)
* Avoid polling file descriptors if there are none
* waiting:
*/
- if (TAILQ_EMPTY(&_workq) == 0) {
+ if (TAILQ_EMPTY(&_workq) != 0) {
}
/*
* Poll file descriptors only if a new scheduling signal
OpenPOWER on IntegriCloud