Lines Matching refs:hands

85 static int  init_thread_push_handlers(THREAD_EVENT_HANDLER **hands);
87 static void init_thread_destructor(void *hands);
90 static void init_thread_stop(void *arg, THREAD_EVENT_HANDLER **hands);
95 THREAD_EVENT_HANDLER **hands = CRYPTO_THREAD_get_local(local); in init_get_thread_local() local
98 if (hands == NULL) { in init_get_thread_local()
100 if ((hands = OPENSSL_zalloc(sizeof(*hands))) == NULL) in init_get_thread_local()
103 if (!CRYPTO_THREAD_set_local(local, hands)) { in init_get_thread_local()
104 OPENSSL_free(hands); in init_get_thread_local()
109 if (!init_thread_push_handlers(hands)) { in init_get_thread_local()
111 OPENSSL_free(hands); in init_get_thread_local()
120 return hands; in init_get_thread_local()
153 static int init_thread_push_handlers(THREAD_EVENT_HANDLER **hands) in init_thread_push_handlers() argument
164 ret = (sk_THREAD_EVENT_HANDLER_PTR_push(gtr->skhands, hands) != 0); in init_thread_push_handlers()
181 THREAD_EVENT_HANDLER **hands in init_thread_remove_handlers() local
184 if (hands == handsin) { in init_thread_remove_handlers()
194 static void init_thread_destructor(void *hands) in init_thread_destructor() argument
196 init_thread_stop(NULL, (THREAD_EVENT_HANDLER **)hands); in init_thread_destructor()
197 init_thread_remove_handlers(hands); in init_thread_destructor()
198 OPENSSL_free(hands); in init_thread_destructor()
231 THREAD_EVENT_HANDLER **hands in OPENSSL_thread_stop() local
233 init_thread_stop(NULL, hands); in OPENSSL_thread_stop()
235 init_thread_remove_handlers(hands); in OPENSSL_thread_stop()
236 OPENSSL_free(hands); in OPENSSL_thread_stop()
243 THREAD_EVENT_HANDLER **hands in ossl_ctx_thread_stop() local
245 init_thread_stop(ctx, hands); in ossl_ctx_thread_stop()
253 THREAD_EVENT_HANDLER **hands = NULL; in thread_event_ossl_ctx_new() local
263 hands = OPENSSL_zalloc(sizeof(*hands)); in thread_event_ossl_ctx_new()
264 if (hands == NULL) in thread_event_ossl_ctx_new()
267 if (!CRYPTO_THREAD_set_local(tlocal, hands)) in thread_event_ossl_ctx_new()
272 OPENSSL_free(hands); in thread_event_ossl_ctx_new()
295 THREAD_EVENT_HANDLER **hands; in ossl_ctx_thread_stop() local
302 hands = init_get_thread_local(local, 0, 0); in ossl_ctx_thread_stop()
303 init_thread_stop(ctx, hands); in ossl_ctx_thread_stop()
304 OPENSSL_free(hands); in ossl_ctx_thread_stop()
309 static void init_thread_stop(void *arg, THREAD_EVENT_HANDLER **hands) in init_thread_stop() argument
314 if (hands == NULL) in init_thread_stop()
317 curr = *hands; in init_thread_stop()
326 *hands = curr->next; in init_thread_stop()
340 THREAD_EVENT_HANDLER **hands; in ossl_init_thread_start() local
363 hands = init_get_thread_local(local, 1, 0); in ossl_init_thread_start()
364 if (hands == NULL) in ossl_init_thread_start()
368 if (*hands == NULL) { in ossl_init_thread_start()
389 hand->next = *hands; in ossl_init_thread_start()
390 *hands = hand; in ossl_init_thread_start()
411 THREAD_EVENT_HANDLER **hands in init_thread_deregister() local
415 if (hands == NULL) { in init_thread_deregister()
420 curr = *hands; in init_thread_deregister()
426 *hands = curr->next; in init_thread_deregister()
436 OPENSSL_free(hands); in init_thread_deregister()