CRYPTO_atomic_load

Atomically load a 64-bit value, optionally under lock.

Synopsis

Declared in <openssl/crypto.h>

int
CRYPTO_atomic_load(
    uint64_t* val,
    uint64_t* ret,
    CRYPTO_RWLOCK* lock);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
valAddress of the value to read.
retReceives a snapshot of *val; must not be NULL.
lockOptional CRYPTO_RWLOCK used when hardware atomics are unavailable, or NULL.