|
|
@@ -178,50 +178,39 @@ void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src); |
|
|
|
/* CRYPTO_THREADID_hash returns a hash of the numeric value of |id|. */ |
|
|
|
uint32_t CRYPTO_THREADID_hash(const CRYPTO_THREADID *id); |
|
|
|
|
|
|
|
/* These are the locks used by OpenSSL. These values should match up with the |
|
|
|
* table in thread.c. */ |
|
|
|
#define CRYPTO_LOCK_ERR 1 |
|
|
|
#define CRYPTO_LOCK_EX_DATA 2 |
|
|
|
#define CRYPTO_LOCK_X509 3 |
|
|
|
#define CRYPTO_LOCK_X509_INFO 4 |
|
|
|
#define CRYPTO_LOCK_X509_PKEY 5 |
|
|
|
#define CRYPTO_LOCK_X509_CRL 6 |
|
|
|
#define CRYPTO_LOCK_X509_REQ 7 |
|
|
|
#define CRYPTO_LOCK_DSA 8 |
|
|
|
#define CRYPTO_LOCK_RSA 9 |
|
|
|
#define CRYPTO_LOCK_EVP_PKEY 10 |
|
|
|
#define CRYPTO_LOCK_X509_STORE 11 |
|
|
|
#define CRYPTO_LOCK_SSL_CTX 12 |
|
|
|
#define CRYPTO_LOCK_SSL_CERT 13 |
|
|
|
#define CRYPTO_LOCK_SSL_SESSION 14 |
|
|
|
#define CRYPTO_LOCK_SSL_SESS_CERT 15 |
|
|
|
#define CRYPTO_LOCK_SSL 16 |
|
|
|
#define CRYPTO_LOCK_SSL_METHOD 17 |
|
|
|
#define CRYPTO_LOCK_RAND 18 |
|
|
|
#define CRYPTO_LOCK_RAND2 19 |
|
|
|
#define CRYPTO_LOCK_MALLOC 20 |
|
|
|
#define CRYPTO_LOCK_BIO 21 |
|
|
|
#define CRYPTO_LOCK_GETHOSTBYNAME 22 |
|
|
|
#define CRYPTO_LOCK_GETSERVBYNAME 23 |
|
|
|
#define CRYPTO_LOCK_READDIR 24 |
|
|
|
#define CRYPTO_LOCK_RSA_BLINDING 25 |
|
|
|
#define CRYPTO_LOCK_DH 26 |
|
|
|
#define CRYPTO_LOCK_MALLOC2 27 |
|
|
|
#define CRYPTO_LOCK_DSO 28 |
|
|
|
#define CRYPTO_LOCK_DYNLOCK 29 |
|
|
|
#define CRYPTO_LOCK_ENGINE 30 |
|
|
|
#define CRYPTO_LOCK_UI 31 |
|
|
|
#define CRYPTO_LOCK_ECDSA 32 |
|
|
|
#define CRYPTO_LOCK_EC 33 |
|
|
|
#define CRYPTO_LOCK_ECDH 34 |
|
|
|
#define CRYPTO_LOCK_BN 35 |
|
|
|
#define CRYPTO_LOCK_EC_PRE_COMP 36 |
|
|
|
#define CRYPTO_LOCK_STORE 37 |
|
|
|
#define CRYPTO_LOCK_COMP 38 |
|
|
|
#define CRYPTO_LOCK_FIPS 39 |
|
|
|
#define CRYPTO_LOCK_FIPS2 40 |
|
|
|
#define CRYPTO_LOCK_OBJ 40 |
|
|
|
#define CRYPTO_NUM_LOCKS 42 |
|
|
|
/* Lock IDs start from 1. CRYPTO_LOCK_INVALID_LOCK is an unused placeholder |
|
|
|
* used to ensure no lock has ID 0. */ |
|
|
|
#define CRYPTO_LOCK_LIST \ |
|
|
|
CRYPTO_LOCK_ITEM(CRYPTO_LOCK_INVALID_LOCK), \ |
|
|
|
CRYPTO_LOCK_ITEM(CRYPTO_LOCK_BIO), \ |
|
|
|
CRYPTO_LOCK_ITEM(CRYPTO_LOCK_DH), \ |
|
|
|
CRYPTO_LOCK_ITEM(CRYPTO_LOCK_DSA), \ |
|
|
|
CRYPTO_LOCK_ITEM(CRYPTO_LOCK_EC), \ |
|
|
|
CRYPTO_LOCK_ITEM(CRYPTO_LOCK_EC_PRE_COMP), \ |
|
|
|
CRYPTO_LOCK_ITEM(CRYPTO_LOCK_ERR), \ |
|
|
|
CRYPTO_LOCK_ITEM(CRYPTO_LOCK_EVP_PKEY), \ |
|
|
|
CRYPTO_LOCK_ITEM(CRYPTO_LOCK_EX_DATA), \ |
|
|
|
CRYPTO_LOCK_ITEM(CRYPTO_LOCK_OBJ), \ |
|
|
|
CRYPTO_LO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