[#CRYPTO_THREAD_run_once]
= CRYPTO&lowbar;THREAD&lowbar;run&lowbar;once
:mrdocs:

Run `init` exactly once across threads using a CRYPTO&lowbar;ONCE control&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CRYPTO&lowbar;THREAD&lowbar;run&lowbar;once(
    xref:CRYPTO_ONCE.adoc[CRYPTO&lowbar;ONCE]* once,
    void(* init)());
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *once*
| Once&hyphen;control variable (initialize with CRYPTO&lowbar;ONCE&lowbar;STATIC&lowbar;INIT)&period;
| *init*
| Function invoked at most once process&hyphen;wide for `once&period;`
|===


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