diff options
Diffstat (limited to 'lib/libkse/thread/thr_create.c')
-rw-r--r-- | lib/libkse/thread/thr_create.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libkse/thread/thr_create.c b/lib/libkse/thread/thr_create.c index b8a1c46..3a80611 100644 --- a/lib/libkse/thread/thr_create.c +++ b/lib/libkse/thread/thr_create.c @@ -299,10 +299,9 @@ 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->state = PS_SUSPENDED; - PTHREAD_WAITQ_INSERT(new_thread); - } else { + else { new_thread->state = PS_RUNNING; PTHREAD_PRIOQ_INSERT_TAIL(new_thread); } |