summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2002-07-09 13:24:52 +0000
committerdeischen <deischen@FreeBSD.org>2002-07-09 13:24:52 +0000
commit22c445eb6fd40cd747917e95c97163266a879184 (patch)
treed4855c20e4e86230de190fd91ffcfdbe23403ff3 /lib/libpthread
parent3b1e5e1a741414c5de68c34b12263bfe5b766e2d (diff)
downloadFreeBSD-src-22c445eb6fd40cd747917e95c97163266a879184.zip
FreeBSD-src-22c445eb6fd40cd747917e95c97163266a879184.tar.gz
Oops, forgot to set the suspended flag for threads that are created
initially suspended. This was preventing such threads from getting resumed. Reported by: Bill Huey <billh@gnuppy.monkey.org>
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/thread/thr_create.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c
index f846789..0f006a9 100644
--- a/lib/libpthread/thread/thr_create.c
+++ b/lib/libpthread/thread/thr_create.c
@@ -207,9 +207,10 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
/* Add the thread to the linked list of all threads: */
TAILQ_INSERT_HEAD(&_thread_list, new_thread, tle);
- if (pattr->suspend == PTHREAD_CREATE_SUSPENDED)
+ if (pattr->suspend == PTHREAD_CREATE_SUSPENDED) {
+ new_thread->flags |= PTHREAD_FLAGS_SUSPENDED;
new_thread->state = PS_SUSPENDED;
- else {
+ } else {
new_thread->state = PS_RUNNING;
PTHREAD_PRIOQ_INSERT_TAIL(new_thread);
}
OpenPOWER on IntegriCloud