From 0593ac4cbb15c2a87a2c9c9ecd713118d935895a Mon Sep 17 00:00:00 2001 From: mtm Date: Mon, 15 Dec 2003 09:35:02 +0000 Subject: When creating a pthread in the suspended state their were two problems: (1) The wrong flag was being checked for in the attribute (2) The pthread's state was not being set to indicate it was suspended. Noticed by: Igor Sysoev --- lib/libthr/thread/thr_create.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/libthr/thread/thr_create.c') diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index 0b08562..41019ad 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -185,10 +185,12 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, * Create the thread. * */ - if (pattr->suspend == PTHREAD_FLAGS_SUSPENDED) + if (pattr->suspend == PTHREAD_CREATE_SUSPENDED) { + new_thread->flags |= PTHREAD_FLAGS_SUSPENDED; flags = THR_SUSPENDED; - else + } else { flags = 0; + } ret = thr_create(&new_thread->ctx, &new_thread->thr_id, flags); -- cgit v1.1