CRYPTO_THREAD_run_once

Run init exactly once across threads using a CRYPTO_ONCE control.

Synopsis

Declared in <openssl/crypto.h>

int
CRYPTO_THREAD_run_once(
    CRYPTO_ONCE* once,
    void(* init)());

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
onceOnce-control variable (initialize with CRYPTO_ONCE_STATIC_INIT).
initFunction invoked at most once process-wide for once.