Remove |CRYPTO_add|.

It's no longer needed after the conversion to |CRYPTO_refcount_t|.

Change-Id: Ied129c4c247fcd426745fa016350528b7571aaaa
Reviewed-on: https://boringssl-review.googlesource.com/4774
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
Adam Langley 2015-05-15 13:10:54 -07:00 committed by Adam Langley
parent 0b5e3908cf
commit 03163f3a11
2 changed files with 0 additions and 24 deletions

View File

@ -129,22 +129,6 @@ void CRYPTO_lock(int mode, int lock_num, const char *file, int line) {
}
}
int CRYPTO_add_lock(int *pointer, int amount, int lock_num, const char *file,
int line) {
int ret = 0;
if (add_lock_callback != NULL) {
ret = add_lock_callback(pointer, amount, lock_num, file, line);
} else {
CRYPTO_lock(CRYPTO_LOCK | CRYPTO_WRITE, lock_num, file, line);
ret = *pointer + amount;
*pointer = ret;
CRYPTO_lock(CRYPTO_UNLOCK | CRYPTO_WRITE, lock_num, file, line);
}
return ret;
}
void CRYPTO_set_id_callback(unsigned long (*func)(void)) {}
void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(

View File

@ -181,12 +181,6 @@ int (*CRYPTO_get_add_lock_callback(void))(int *num, int amount, int lock_num,
OPENSSL_EXPORT void CRYPTO_lock(int mode, int lock_num, const char *file,
int line);
/* CRYPTO_add_lock adds |amount| to |*pointer|, protected by the lock specified
* by |lock_num|. It returns the new value of |*pointer|. Don't call this
* function directly, rather use the |CRYPTO_add| macro. */
OPENSSL_EXPORT int CRYPTO_add_lock(int *pointer, int amount, int lock_num,
const char *file, int line);
/* 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 \
@ -234,8 +228,6 @@ enum {
CRYPTO_lock(CRYPTO_LOCK | CRYPTO_READ, lock_num, __FILE__, __LINE__)
#define CRYPTO_r_unlock(lock_num) \
CRYPTO_lock(CRYPTO_UNLOCK | CRYPTO_READ, lock_num, __FILE__, __LINE__)
#define CRYPTO_add(addr, amount, lock_num) \
CRYPTO_add_lock(addr, amount, lock_num, __FILE__, __LINE__)
/* Private functions.