diff options
author | Matt Caswell <matt@openssl.org> | 2016-02-09 09:13:45 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-02-09 15:11:38 +0000 |
commit | 71567a6f418ed1dc42d4c5ec57f72d3119b75966 (patch) | |
tree | 711f27361058f6547b849988dacdcf85d5bc2d69 /crypto/init.c | |
parent | 8793f012f11416abd300aa524057c863e8c16dd5 (diff) |
Provide a thread stop API
Add the OPENSSL_INIT_thread_stop() function.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/init.c')
-rw-r--r-- | crypto/init.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/init.c b/crypto/init.c index 53ed235699..856b06afdd 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -77,6 +77,8 @@ #include <internal/err.h> #include <stdlib.h> +static void ossl_init_thread_stop(struct thread_local_inits_st *locals); + /* Implement "once" functionality */ #if !defined(OPENSSL_THREADS) typedef int OPENSSL_INIT_ONCE; @@ -466,7 +468,7 @@ static void ossl_init_zlib(void) zlib_inited = 1; } -void ossl_init_thread_stop(struct thread_local_inits_st *locals) +static void ossl_init_thread_stop(struct thread_local_inits_st *locals) { /* Can't do much about this */ if (locals == NULL) @@ -492,6 +494,12 @@ void ossl_init_thread_stop(struct thread_local_inits_st *locals) ossl_init_thread_stop_cleanup(); } +void OPENSSL_INIT_thread_stop(void) +{ + ossl_init_thread_stop( + (struct thread_local_inits_st *)ossl_init_get_thread_local(0)); +} + int ossl_init_thread_start(uint64_t opts) { struct thread_local_inits_st *locals = ossl_init_get_thread_local(1); |