summaryrefslogtreecommitdiff
path: root/lib/libpthread
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>2005-01-06 17:40:22 +0000
committermycroft <mycroft@NetBSD.org>2005-01-06 17:40:22 +0000
commit077972bfb2d6bb7bbf18cc6d964944adb92956af (patch)
tree2f9c34d89362e29e21333554540a7a23099ddc96 /lib/libpthread
parent75a94788186f7f0f5737b110ad88618819f0f186 (diff)
Replace the even-odd test for incrementing unblockgen with a simple
blockgen!=unblockgen. I'm not sure this is 100% correct, but it partly alleviates a problem with multiple unblocks for the same thread getting stacked up.
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/pthread_run.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/pthread_run.c b/lib/libpthread/pthread_run.c
index 834db726abf..8c43fdcb106 100644
--- a/lib/libpthread/pthread_run.c
+++ b/lib/libpthread/pthread_run.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_run.c,v 1.17 2004/03/14 01:19:42 cl Exp $ */
+/* $NetBSD: pthread_run.c,v 1.18 2005/01/06 17:40:22 mycroft Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_run.c,v 1.17 2004/03/14 01:19:42 cl Exp $");
+__RCSID("$NetBSD: pthread_run.c,v 1.18 2005/01/06 17:40:22 mycroft Exp $");
#include <ucontext.h>
#include <errno.h>
@@ -265,7 +265,7 @@ pthread__sched_bulk(pthread_t self, pthread_t qhead)
next = qhead->pt_next;
pthread__assert(qhead->pt_spinlocks == 0);
pthread__assert(qhead->pt_type != PT_THREAD_UPCALL);
- if (qhead->pt_unblockgen & 1)
+ if (qhead->pt_unblockgen != qhead->pt_blockgen)
qhead->pt_unblockgen++;
if (qhead->pt_type == PT_THREAD_NORMAL) {
qhead->pt_state = PT_STATE_RUNNABLE;