Move corePKCS11 forward and update to latest core_pkcs11.h (#441)
* Move corePKCS11 forward. * Update licenses. * strip NULL terminator. * Add threading_alt.h * Use github link. Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>pull/450/head^2
parent
353d2ef35b
commit
492ac6edb2
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* FreeRTOS V202011.00
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* https://www.FreeRTOS.org
|
||||||
|
* https://github.com/FreeRTOS
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __THREADING_ALT_H__
|
||||||
|
#define __THREADING_ALT_H__
|
||||||
|
|
||||||
|
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "semphr.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mutex struct used to synchronize mbed TLS operations.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
SemaphoreHandle_t mutex; /**< @brief FreeRTOS semaphore. */
|
||||||
|
char is_valid; /**< @brief Flag used by mbedTLS to track wether a mutex is valid. */
|
||||||
|
} 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 * ) );
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* ifndef __THREADING_ALT_H__ */
|
@ -1 +1 @@
|
|||||||
Subproject commit 40bef76639fc5e85a7ec188a31a45cf72d5fb6a0
|
Subproject commit d35a8f041fa335a1661ad0a523c44f4c967fa492
|
Loading…
Reference in New Issue