diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2016-03-04 15:43:46 +0000 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-03-08 09:07:32 -0500 |
commit | d188a53617de68a707fe9459d4f4245d9a57cd9c (patch) | |
tree | 5280ea92a3c2772e7c0446efa6fede7eba6e7eb4 /crypto/bn | |
parent | f989cd8c0bb3c579d112294bf8e304647b334ee8 (diff) | |
download | openssl-d188a53617de68a707fe9459d4f4245d9a57cd9c.tar.gz |
Convert CRYPTO_LOCK_{DH,DSA,RSA} to new multi-threading API
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/bn')
-rw-r--r-- | crypto/bn/bn_mont.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c index e0a9a0910e..dfa395afd6 100644 --- a/crypto/bn/bn_mont.c +++ b/crypto/bn/bn_mont.c @@ -496,14 +496,14 @@ BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from) return (to); } -BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock, +BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock, const BIGNUM *mod, BN_CTX *ctx) { BN_MONT_CTX *ret; - CRYPTO_r_lock(lock); + CRYPTO_THREAD_read_lock(lock); ret = *pmont; - CRYPTO_r_unlock(lock); + CRYPTO_THREAD_unlock(lock); if (ret) return ret; @@ -524,12 +524,12 @@ BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock, } /* The locked compare-and-set, after the local work is done. */ - CRYPTO_w_lock(lock); + CRYPTO_THREAD_write_lock(lock); if (*pmont) { BN_MONT_CTX_free(ret); ret = *pmont; } else *pmont = ret; - CRYPTO_w_unlock(lock); + CRYPTO_THREAD_unlock(lock); return ret; } |