Allocate a thread‐local storage key for use with CRYPTO_THREAD_get/set_local().

Synopsis

Declared in <openssl/crypto.h>

int
CRYPTO_THREAD_init_local(
    CRYPTO_THREAD_LOCAL* key,
    void(* cleanup)(void*));

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

key

Receives the new key on success.

cleanup

Optional destructor invoked on thread exit for non‐NULL values, or NULL.

Created with MrDocs