summaryrefslogtreecommitdiff
path: root/include/openssl/async.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-11-13 23:54:44 +0000
committerMatt Caswell <matt@openssl.org>2015-11-20 23:39:30 +0000
commit68487a9b0631d27be9a1f4565e7e652ae9cb6aad (patch)
treef08b9aedfa12d06d5602f2422def273b96f7ea2c /include/openssl/async.h
parent27949c353e68825f119410f8fd73ae1d667581c7 (diff)
downloadopenssl-new-68487a9b0631d27be9a1f4565e7e652ae9cb6aad.tar.gz
Convert __thread to pthreads for Thread Local Storage
In theory the pthreads approach for Thread Local Storage should be more portable. This also changes some APIs in order to accommodate this change. In particular ASYNC_init_pool is renamed ASYNC_init_thread and ASYNC_free_pool is renamed ASYNC_cleanup_thread. Also introduced ASYNC_init and ASYNC_cleanup. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'include/openssl/async.h')
-rw-r--r--include/openssl/async.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/openssl/async.h b/include/openssl/async.h
index acc86bceaf..83bde16eba 100644
--- a/include/openssl/async.h
+++ b/include/openssl/async.h
@@ -75,8 +75,10 @@ typedef struct async_job_st ASYNC_JOB;
#define ASYNC_PAUSE 2
#define ASYNC_FINISH 3
-int ASYNC_init_pool(size_t max_size, size_t init_size);
-void ASYNC_free_pool(void);
+int ASYNC_init(int init_thread, size_t max_size, size_t init_size);
+void ASYNC_cleanup(int cleanupthread);
+int ASYNC_init_thread(size_t max_size, size_t init_size);
+void ASYNC_cleanup_thread(void);
int ASYNC_start_job(ASYNC_JOB **job, int *ret, int (*func)(void *),
void *args, size_t size);
@@ -100,7 +102,7 @@ void ERR_load_ASYNC_strings(void);
/* Function codes. */
# define ASYNC_F_ASYNC_CTX_NEW 100
-# define ASYNC_F_ASYNC_INIT_POOL 101
+# define ASYNC_F_ASYNC_INIT_THREAD 101
# define ASYNC_F_ASYNC_JOB_NEW 102
# define ASYNC_F_ASYNC_PAUSE_JOB 103
# define ASYNC_F_ASYNC_START_FUNC 104