goto err;
#endif
-#if defined(OPENSSL_THREADS)
+#ifndef OPENSSL_NO_THREAD_POOL
ctx->threads = ossl_threads_ctx_new(ctx);
if (ctx->threads == NULL)
goto err;
}
#endif
-#if defined(OPENSSL_THREADS)
+#ifndef OPENSSL_NO_THREAD_POOL
if (ctx->threads != NULL) {
ossl_threads_ctx_free(ctx->threads);
ctx->threads = NULL;
case OSSL_LIB_CTX_SELF_TEST_CB_INDEX:
return ctx->self_test_cb;
#endif
-#if defined(OPENSSL_THREADS)
+#ifndef OPENSSL_NO_THREAD_POOL
case OSSL_LIB_CTX_THREAD_INDEX:
return ctx->threads;
#endif
#include <openssl/configuration.h>
#include <internal/thread_arch.h>
-#if defined(OPENSSL_THREADS)
-
CRYPTO_THREAD *ossl_crypto_thread_native_start(CRYPTO_THREAD_ROUTINE routine,
void *data, int joinable)
{
return 1;
}
-
-#else
-
-CRYPTO_THREAD *ossl_crypto_thread_native_start(CRYPTO_THREAD_ROUTINE routine,
- void *data, int joinable)
-{
- return NULL;
-}
-
-int ossl_crypto_thread_native_clean(CRYPTO_THREAD *handle)
-{
- return 0;
-}
-
-#endif
LIBS=../../libcrypto
-$THREADS=\
+IF[{- !$disabled{'thread-pool'} -}]
+ $THREADS=\
api.c internal.c arch.c \
arch/thread_win.c arch/thread_posix.c arch/thread_none.c
+ELSE
+ $THREADS=api.c
+ENDIF
SOURCE[../../libcrypto]=$THREADS
SOURCE[../../providers/libfips.a]=$THREADS
#endif
-#if defined(OPENSSL_THREADS)
-
void *ossl_threads_ctx_new(OSSL_LIB_CTX *ctx)
{
struct openssl_threads_st *t = OPENSSL_zalloc(sizeof(*t));
ossl_crypto_condvar_free(&t->cond_finished);
OPENSSL_free(t);
}
-
-#endif