diff options
author | Matt Caswell <matt@openssl.org> | 2015-11-19 21:44:13 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-20 23:40:23 +0000 |
commit | 22a34c2fab39c38cac4a22a0e15ab9a1fd98f57c (patch) | |
tree | 5ce684a33431d24bd40a4d2a50b7ca592f08a8e0 /crypto/async/arch/async_posix.c | |
parent | 68487a9b0631d27be9a1f4565e7e652ae9cb6aad (diff) |
Implement windows async thread local variable support
Implements Thread Local Storage in the windows async port. This also has
some knock on effects to the posix and null implementations.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/async/arch/async_posix.c')
-rw-r--r-- | crypto/async/arch/async_posix.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/crypto/async/arch/async_posix.c b/crypto/async/arch/async_posix.c index bd4b0c2f1b..77a2c33de6 100644 --- a/crypto/async/arch/async_posix.c +++ b/crypto/async/arch/async_posix.c @@ -66,7 +66,7 @@ pthread_key_t posixpool; #define STACKSIZE 32768 -int async_thread_local_init(void) +int async_global_init(void) { if (pthread_key_create(&posixctx, NULL) != 0 || pthread_key_create(&posixpool, NULL) != 0) @@ -75,6 +75,22 @@ int async_thread_local_init(void) return 1; } +int async_local_init(void) +{ + if (!async_set_ctx(NULL) || ! async_set_pool(NULL)) + return 0; + + return 1; +} + +void async_local_cleanup(void) +{ +} + +void async_global_cleanup(void) +{ +} + int async_fibre_init(async_fibre *fibre) { void *stack = NULL; |