Lines Matching refs:thread
20 CRYPTO_THREAD *thread; in thread_start_thunk() local
23 thread = (CRYPTO_THREAD *)vthread; in thread_start_thunk()
25 ret = thread->routine(thread->data); in thread_start_thunk()
26 ossl_crypto_mutex_lock(thread->statelock); in thread_start_thunk()
27 CRYPTO_THREAD_SET_STATE(thread, CRYPTO_THREAD_FINISHED); in thread_start_thunk()
28 thread->retval = ret; in thread_start_thunk()
29 ossl_crypto_condvar_broadcast(thread->condvar); in thread_start_thunk()
30 ossl_crypto_mutex_unlock(thread->statelock); in thread_start_thunk()
35 int ossl_crypto_thread_native_spawn(CRYPTO_THREAD *thread) in ossl_crypto_thread_native_spawn() argument
46 if (!thread->joinable) in ossl_crypto_thread_native_spawn()
48 ret = pthread_create(handle, &attr, thread_start_thunk, thread); in ossl_crypto_thread_native_spawn()
54 thread->handle = handle; in ossl_crypto_thread_native_spawn()
58 thread->handle = NULL; in ossl_crypto_thread_native_spawn()
63 int ossl_crypto_thread_native_perform_join(CRYPTO_THREAD *thread, CRYPTO_THREAD_RETVAL *retval) in ossl_crypto_thread_native_perform_join() argument
68 if (thread == NULL || thread->handle == NULL) in ossl_crypto_thread_native_perform_join()
71 handle = (pthread_t *) thread->handle; in ossl_crypto_thread_native_perform_join()
91 int ossl_crypto_thread_native_is_self(CRYPTO_THREAD *thread) in ossl_crypto_thread_native_is_self() argument
93 return pthread_equal(*(pthread_t *)thread->handle, pthread_self()); in ossl_crypto_thread_native_is_self()