Lines Matching refs:thr

425 void proxy_thread_init(void *ctx, LIBEVENT_THREAD *thr) {  in proxy_thread_init()  argument
427 assert(thr != NULL); in proxy_thread_init()
430 thr->proxy_hooks = calloc(CMD_SIZE, sizeof(struct proxy_hook)); in proxy_thread_init()
431 if (thr->proxy_hooks == NULL) { in proxy_thread_init()
435 thr->proxy_int_stats = calloc(1, sizeof(struct proxy_int_stats)); in proxy_thread_init()
436 if (thr->proxy_int_stats == NULL) { in proxy_thread_init()
440 pthread_mutex_init(&thr->proxy_limit_lock, NULL); in proxy_thread_init()
441 thr->proxy_ctx = ctx; in proxy_thread_init()
462 thr->L = L; in proxy_thread_init()
464 proxy_register_libs(ctx, thr, L); in proxy_thread_init()
467 thr->proxy_rng[x] = rand(); in proxy_thread_init()
470 thr->proxy_gc_timer = evtimer_new(thr->base, proxy_gc_timerpoke, thr); in proxy_thread_init()
472 proxy_gc_timerpoke(0, 0, thr); in proxy_thread_init()
476 thr->proxy_event_thread = t; in proxy_thread_init()
477 proxy_init_event_thread(t, ctx, thr->base); in proxy_thread_init()
706 LIBEVENT_THREAD *thr = c->thread; in complete_nread_proxy() local
707 lua_State *L = thr->L; in complete_nread_proxy()
737 pthread_mutex_lock(&thr->proxy_limit_lock); in complete_nread_proxy()
738 thr->proxy_buffer_memory_used += rq->pr.vlen; in complete_nread_proxy()
739 pthread_mutex_unlock(&thr->proxy_limit_lock); in complete_nread_proxy()
1008 LIBEVENT_THREAD *thr = c->thread; in proxy_process_command() local
1009 struct proxy_hook *hooks = thr->proxy_hooks; in proxy_process_command()
1010 lua_State *L = thr->L; in proxy_process_command()
1011 proxy_ctx_t *ctx = thr->proxy_ctx; in proxy_process_command()