[#CRYPTO_atomic_load_int]
= CRYPTO&lowbar;atomic&lowbar;load&lowbar;int
:mrdocs:

Atomically load an int value, optionally under `lock&period;`

== Synopsis

Declared in `&lt;openssl&sol;crypto&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CRYPTO&lowbar;atomic&lowbar;load&lowbar;int(
    int* val,
    int* ret,
    xref:CRYPTO_RWLOCK.adoc[CRYPTO&lowbar;RWLOCK]* lock);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *val*
| Address of the integer to read&period;
| *ret*
| Receives a snapshot of &ast;`val&semi;` must not be NULL&period;
| *lock*
| Optional CRYPTO&lowbar;RWLOCK used when hardware atomics are unavailable, or NULL&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
