summaryrefslogtreecommitdiffstats
path: root/crypto/include/internal/cryptlib_int.h
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2018-03-07 19:25:55 +0100
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-03-19 15:04:40 +0100
commit7caf122e717e79afcb986fe217e77a630b67bf4c (patch)
tree5ced62615263082ab998c18c860b44c9b442ca39 /crypto/include/internal/cryptlib_int.h
parent4e6647506331fc3b3ef5b23e5dbe188279ddd575 (diff)
Make the public and private DRBG thread local
This avoids lock contention. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/5547)
Diffstat (limited to 'crypto/include/internal/cryptlib_int.h')
-rw-r--r--crypto/include/internal/cryptlib_int.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/include/internal/cryptlib_int.h b/crypto/include/internal/cryptlib_int.h
index 3dddf08200..633551762b 100644
--- a/crypto/include/internal/cryptlib_int.h
+++ b/crypto/include/internal/cryptlib_int.h
@@ -14,6 +14,7 @@
struct thread_local_inits_st {
int async;
int err_state;
+ int rand;
};
int ossl_init_thread_start(uint64_t opts);
@@ -28,5 +29,6 @@ int ossl_init_thread_start(uint64_t opts);
/* OPENSSL_INIT_THREAD flags */
# define OPENSSL_INIT_THREAD_ASYNC 0x01
# define OPENSSL_INIT_THREAD_ERR_STATE 0x02
+# define OPENSSL_INIT_THREAD_RAND 0x04
void ossl_malloc_setup_failures(void);