Lines Matching refs:thread
125 dcethread* thread;
136 start_args->self = thread = dcethread__new();
138 /* Record if this thread was created joinably */
141 thread->flag.joinable = 1;
144 /* If thread is joinable, give it an extra reference */
145 if (thread->flag.joinable)
147 thread->refs++;
150 if (dcethread__set_errno(pthread_create((pthread_t*) &thread->pthread, attr, proxy_start, start_args)))
152 dcethread__delete(thread);
157 DCETHREAD_TRACE("Thread %p: created (pthread %lu)", thread, (unsigned long) thread->pthread);
159 dcethread__lock(thread);
160 while (thread->state == DCETHREAD_STATE_CREATED)
162 dcethread__wait(thread);
164 dcethread__unlock(thread);
166 DCETHREAD_TRACE("Thread %p: started", thread);
168 *_thread = thread;
196 dcethread* thread = NULL;
198 MU_TRY_DCETHREAD( dcethread_create(&thread, NULL, basic, (void*) 0xDEADBEEF) );
200 MU_ASSERT(thread != NULL);