#define _BORINGSSL_PROHIBIT_OPENSSL_MALLOC
#include "internal.h"
#if defined(OPENSSL_PTHREADS)
#include <assert.h>
#include <pthread.h>
#include <stdlib.h>
#include <string.h>
void CRYPTO_MUTEX_init(CRYPTO_MUTEX *lock) { … }
void CRYPTO_MUTEX_lock_read(CRYPTO_MUTEX *lock) { … }
void CRYPTO_MUTEX_lock_write(CRYPTO_MUTEX *lock) { … }
void CRYPTO_MUTEX_unlock_read(CRYPTO_MUTEX *lock) { … }
void CRYPTO_MUTEX_unlock_write(CRYPTO_MUTEX *lock) { … }
void CRYPTO_MUTEX_cleanup(CRYPTO_MUTEX *lock) { … }
void CRYPTO_once(CRYPTO_once_t *once, void (*init)(void)) { … }
static pthread_mutex_t g_destructors_lock = …;
static thread_local_destructor_t g_destructors[NUM_OPENSSL_THREAD_LOCALS];
static void thread_local_destructor(void *arg) { … }
static pthread_once_t g_thread_local_init_once = …;
static pthread_key_t g_thread_local_key;
static int g_thread_local_key_created = …;
static void thread_local_init(void) { … }
void *CRYPTO_get_thread_local(thread_local_data_t index) { … }
int CRYPTO_set_thread_local(thread_local_data_t index, void *value,
thread_local_destructor_t destructor) { … }
#endif