Lines Matching refs:thread
138 HANDLE thread;
149 ares__thread_t *thread = lpParameter;
151 thread->rv = thread->func(thread->arg);
155 ares_status_t ares__thread_create(ares__thread_t **thread,
160 if (func == NULL || thread == NULL) {
171 thr->thread = CreateThread(NULL, 0, ares__thread_func, thr, 0, &thr->id);
172 if (thr->thread == NULL) {
177 *thread = thr;
181 ares_status_t ares__thread_join(ares__thread_t *thread, void **rv)
185 if (thread == NULL) {
189 if (WaitForSingleObject(thread->thread, INFINITE) != WAIT_OBJECT_0) {
192 CloseHandle(thread->thread);
196 *rv = thread->rv;
198 ares_free(thread);
368 pthread_t thread;
371 ares_status_t ares__thread_create(ares__thread_t **thread,
376 if (func == NULL || thread == NULL) {
384 if (pthread_create(&thr->thread, NULL, func, arg) != 0) {
389 *thread = thr;
393 ares_status_t ares__thread_join(ares__thread_t *thread, void **rv)
398 if (thread == NULL) {
402 if (pthread_join(thread->thread, &ret) != 0) {
405 ares_free(thread);
481 ares_status_t ares__thread_create(ares__thread_t **thread,
484 (void)thread;
490 ares_status_t ares__thread_join(ares__thread_t *thread, void **rv)
492 (void)thread;