/* * * Copyright (c) 2020 Nest Labs, Inc. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once typedef void * mbedtls_threading_mutex_t; extern void mbedtls_threading_set_alt(void (*mutex_init)(mbedtls_threading_mutex_t *), void (*mutex_free)(mbedtls_threading_mutex_t *), int (*mutex_lock)(mbedtls_threading_mutex_t *), int (*mutex_unlock)(mbedtls_threading_mutex_t *)); extern void mbedtls_threading_free_alt(void); #ifdef __cplusplus extern "C" { #endif /**@brief Function for initializing alternative MbedTLS mutexes to enable the usage of the FreeRTOS implementation. */ void freertos_mbedtls_mutex_init(void); /**@brief Function for releasing MbedTLS alternative mutexes. */ void freertos_mbedtls_mutex_free(void); #ifdef __cplusplus } #endif