Lines Matching defs: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);
98 if (hands == NULL) {
100 if ((hands = OPENSSL_zalloc(sizeof(*hands))) == NULL)
103 if (!CRYPTO_THREAD_set_local(local, hands)) {
104 OPENSSL_free(hands);
109 if (!init_thread_push_handlers(hands)) {
111 OPENSSL_free(hands);
120 return hands;
153 static int init_thread_push_handlers(THREAD_EVENT_HANDLER **hands)
164 ret = (sk_THREAD_EVENT_HANDLER_PTR_push(gtr->skhands, hands) != 0);
181 THREAD_EVENT_HANDLER **hands
184 if (hands == handsin) {
194 static void init_thread_destructor(void *hands)
196 init_thread_stop(NULL, (THREAD_EVENT_HANDLER **)hands);
197 init_thread_remove_handlers(hands);
198 OPENSSL_free(hands);
231 THREAD_EVENT_HANDLER **hands
233 init_thread_stop(NULL, hands);
235 init_thread_remove_handlers(hands);
236 OPENSSL_free(hands);
243 THREAD_EVENT_HANDLER **hands
245 init_thread_stop(ctx, hands);
253 THREAD_EVENT_HANDLER **hands = NULL;
263 hands = OPENSSL_zalloc(sizeof(*hands));
264 if (hands == NULL)
267 if (!CRYPTO_THREAD_set_local(tlocal, hands))
272 OPENSSL_free(hands);
295 THREAD_EVENT_HANDLER **hands;
302 hands = init_get_thread_local(local, 0, 0);
303 init_thread_stop(ctx, hands);
304 OPENSSL_free(hands);
309 static void init_thread_stop(void *arg, THREAD_EVENT_HANDLER **hands)
317 if (hands == NULL)
329 curr = *hands;
338 *hands = curr->next;
355 THREAD_EVENT_HANDLER **hands;
378 hands = init_get_thread_local(local, 1, 0);
379 if (hands == NULL)
383 if (*hands == NULL) {
404 hand->next = *hands;
405 *hands = hand;
426 THREAD_EVENT_HANDLER **hands
430 if (hands == NULL) {
435 curr = *hands;
441 *hands = curr->next;
451 OPENSSL_free(hands);