diff options
Diffstat (limited to 'lib/libthr/thread/thr_create.c')
-rw-r--r-- | lib/libthr/thread/thr_create.c | 6 |
1 files changed, 4 insertions, 2 deletions
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); |