Lines Matching refs:qta

22     QUIC_THREAD_ASSIST *qta = arg;  in assist_thread_main()  local
23 CRYPTO_MUTEX *m = ossl_quic_channel_get_mutex(qta->ch); in assist_thread_main()
28 rtor = ossl_quic_channel_get_reactor(qta->ch); in assist_thread_main()
33 if (qta->teardown) in assist_thread_main()
37 if (qta->now_cb != NULL in assist_thread_main()
45 qta->now_cb(qta->now_cb_arg)), in assist_thread_main()
48 ossl_crypto_condvar_wait_timeout(qta->cv, m, deadline); in assist_thread_main()
61 if (qta->teardown) in assist_thread_main()
71 int ossl_quic_thread_assist_init_start(QUIC_THREAD_ASSIST *qta, in ossl_quic_thread_assist_init_start() argument
81 qta->ch = ch; in ossl_quic_thread_assist_init_start()
82 qta->teardown = 0; in ossl_quic_thread_assist_init_start()
83 qta->joined = 0; in ossl_quic_thread_assist_init_start()
84 qta->now_cb = now_cb; in ossl_quic_thread_assist_init_start()
85 qta->now_cb_arg = now_cb_arg; in ossl_quic_thread_assist_init_start()
87 qta->cv = ossl_crypto_condvar_new(); in ossl_quic_thread_assist_init_start()
88 if (qta->cv == NULL) in ossl_quic_thread_assist_init_start()
91 qta->t = ossl_crypto_thread_native_start(assist_thread_main, in ossl_quic_thread_assist_init_start()
92 qta, /*joinable=*/1); in ossl_quic_thread_assist_init_start()
93 if (qta->t == NULL) { in ossl_quic_thread_assist_init_start()
94 ossl_crypto_condvar_free(&qta->cv); in ossl_quic_thread_assist_init_start()
101 int ossl_quic_thread_assist_stop_async(QUIC_THREAD_ASSIST *qta) in ossl_quic_thread_assist_stop_async() argument
103 if (!qta->teardown) { in ossl_quic_thread_assist_stop_async()
104 qta->teardown = 1; in ossl_quic_thread_assist_stop_async()
105 ossl_crypto_condvar_signal(qta->cv); in ossl_quic_thread_assist_stop_async()
111 int ossl_quic_thread_assist_wait_stopped(QUIC_THREAD_ASSIST *qta) in ossl_quic_thread_assist_wait_stopped() argument
114 CRYPTO_MUTEX *m = ossl_quic_channel_get_mutex(qta->ch); in ossl_quic_thread_assist_wait_stopped()
116 if (qta->joined) in ossl_quic_thread_assist_wait_stopped()
119 if (!ossl_quic_thread_assist_stop_async(qta)) in ossl_quic_thread_assist_wait_stopped()
124 if (!ossl_crypto_thread_native_join(qta->t, &rv)) { in ossl_quic_thread_assist_wait_stopped()
129 qta->joined = 1; in ossl_quic_thread_assist_wait_stopped()
135 int ossl_quic_thread_assist_cleanup(QUIC_THREAD_ASSIST *qta) in ossl_quic_thread_assist_cleanup() argument
137 if (!ossl_assert(qta->joined)) in ossl_quic_thread_assist_cleanup()
140 ossl_crypto_condvar_free(&qta->cv); in ossl_quic_thread_assist_cleanup()
141 ossl_crypto_thread_native_clean(qta->t); in ossl_quic_thread_assist_cleanup()
143 qta->ch = NULL; in ossl_quic_thread_assist_cleanup()
144 qta->t = NULL; in ossl_quic_thread_assist_cleanup()
148 int ossl_quic_thread_assist_notify_deadline_changed(QUIC_THREAD_ASSIST *qta) in ossl_quic_thread_assist_notify_deadline_changed() argument
150 if (qta->teardown) in ossl_quic_thread_assist_notify_deadline_changed()
153 ossl_crypto_condvar_signal(qta->cv); in ossl_quic_thread_assist_notify_deadline_changed()