Lines Matching refs:thr
158 ares__thread_t *thr = NULL;
164 thr = ares_malloc_zero(sizeof(*thr));
165 if (thr == NULL) {
169 thr->func = func;
170 thr->arg = arg;
171 thr->thread = CreateThread(NULL, 0, ares__thread_func, thr, 0, &thr->id);
172 if (thr->thread == NULL) {
173 ares_free(thr);
177 *thread = thr;
374 ares__thread_t *thr = NULL;
380 thr = ares_malloc_zero(sizeof(*thr));
381 if (thr == NULL) {
384 if (pthread_create(&thr->thread, NULL, func, arg) != 0) {
385 ares_free(thr);
389 *thread = thr;