diff options
author | David Benjamin <davidben@google.com> | 2016-05-24 18:28:36 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2016-06-01 00:09:29 +0300 |
commit | 29270dea85741f69bd080bea6b28a83476c2bc91 (patch) | |
tree | f1281b90a8819c5f7cadce0482b0fbe367f92f02 /crypto/internal.h | |
parent | 053931e74e42bebd129d9b35d9aceb986e873a8f (diff) |
Split unlock functions into read/write variants.
Windows SRWLOCK requires you call different functions here. Split
them up in preparation for switching Windows from CRITICAL_SECTION.
BUG=37
Change-Id: I7b5c6a98eab9ae5bb0734b805cfa1ff334918f35
Reviewed-on: https://boringssl-review.googlesource.com/8080
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index ded43fe2..2d130fc9 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -393,8 +393,11 @@ OPENSSL_EXPORT void CRYPTO_MUTEX_lock_read(CRYPTO_MUTEX *lock); * of lock on it. */ OPENSSL_EXPORT void CRYPTO_MUTEX_lock_write(CRYPTO_MUTEX *lock); -/* CRYPTO_MUTEX_unlock unlocks |lock|. */ -OPENSSL_EXPORT void CRYPTO_MUTEX_unlock(CRYPTO_MUTEX *lock); +/* CRYPTO_MUTEX_unlock_read unlocks |lock| for reading. */ +OPENSSL_EXPORT void CRYPTO_MUTEX_unlock_read(CRYPTO_MUTEX *lock); + +/* CRYPTO_MUTEX_unlock_write unlocks |lock| for writing. */ +OPENSSL_EXPORT void CRYPTO_MUTEX_unlock_write(CRYPTO_MUTEX *lock); /* CRYPTO_MUTEX_cleanup releases all resources held by |lock|. */ OPENSSL_EXPORT void CRYPTO_MUTEX_cleanup(CRYPTO_MUTEX *lock); @@ -413,8 +416,12 @@ OPENSSL_EXPORT void CRYPTO_STATIC_MUTEX_lock_read( OPENSSL_EXPORT void CRYPTO_STATIC_MUTEX_lock_write( struct CRYPTO_STATIC_MUTEX *lock); -/* CRYPTO_STATIC_MUTEX_unlock unlocks |lock|. */ -OPENSSL_EXPORT void CRYPTO_STATIC_MUTEX_unlock( +/* CRYPTO_STATIC_MUTEX_unlock_read unlocks |lock| for reading. */ +OPENSSL_EXPORT void CRYPTO_STATIC_MUTEX_unlock_read( + struct CRYPTO_STATIC_MUTEX *lock); + +/* CRYPTO_STATIC_MUTEX_unlock_write unlocks |lock| for writing. */ +OPENSSL_EXPORT void CRYPTO_STATIC_MUTEX_unlock_write( struct CRYPTO_STATIC_MUTEX *lock); |