Atomically add amount to *val, optionally under lock.
Declared in <openssl/crypto.h>
int
CRYPTO_atomic_add(
int* val,
int amount,
int* ret,
CRYPTO_RWLOCK* lock);
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| val | Integer to modify in place. |
| amount | Value added to *val. |
| ret | Receives the post-add value of *val; must not be NULL. |
| lock | Optional CRYPTO_RWLOCK used when hardware atomics are unavailable, or NULL. |