diff options
Diffstat (limited to 'lib/libthr/thread/thr_create.c')
-rw-r--r-- | lib/libthr/thread/thr_create.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index 701a1bd..81a95da 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -56,12 +56,12 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, struct thr_param param; struct sched_param sched_param; struct rtprio rtp; - int ret = 0, locked, create_suspended; sigset_t set, oset; - cpuset_t *cpusetp = NULL; - int cpusetsize = 0; - int old_stack_prot; + cpuset_t *cpusetp; + int i, cpusetsize, create_suspended, locked, old_stack_prot, ret; + cpusetp = NULL; + ret = cpusetsize = 0; _thr_check_init(); /* @@ -118,8 +118,8 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, new_thread->cancel_enable = 1; new_thread->cancel_async = 0; /* Initialize the mutex queue: */ - TAILQ_INIT(&new_thread->mutexq); - TAILQ_INIT(&new_thread->pp_mutexq); + for (i = 0; i < TMQ_NITEMS; i++) + TAILQ_INIT(&new_thread->mq[i]); /* Initialise hooks in the thread structure: */ if (new_thread->attr.suspend == THR_CREATE_SUSPENDED) { |