Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed May 3, 2024
1 parent 7dea7ab commit d2fb00e
Show file tree
Hide file tree
Showing 2 changed files with 275 additions and 189 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,34 @@
#ifndef THREADING_ALT_H
#define THREADING_ALT_H

/***************************************************************************//**
* \addtogroup sl_crypto
* \{
******************************************************************************/

/***************************************************************************//**
* \addtogroup sl_crypto_threading Threading Primitives
* \brief Threading primitive implementation for mbed TLS
*
* This file contains the glue logic between the mbed TLS threading API
* and CMSIS RTOS2 API.
*
* In order to enable support for Micrium OS backend
* the user must make sure SL_CATALOG_MICRIUMOS_KERNEL_PRESENT is defined.
* In order to enable support for FreeRTOS backend the user must make sure
* SL_CATALOG_FREERTOS_KERNEL_PRESENT is defined.
*
* Applications created using Simplicity Studio 5 the sl_component_catalog.h
* file will define one of the above in order to declare the presence
* of a specific RTOS.
*
* \note
* In order to use the Silicon Labs Hardware Acceleration plugins in
* multi-threaded applications, select
* <b>Mbed TLS support for EFM32/EFR32 crypto acceleration</b> component.
*
* \{
******************************************************************************/
/***************************************************************************/ /**
* \addtogroup sl_crypto
* \{
******************************************************************************/

/***************************************************************************/ /**
* \addtogroup sl_crypto_threading Threading Primitives
* \brief Threading primitive implementation for mbed TLS
*
* This file contains the glue logic between the mbed TLS threading API
* and CMSIS RTOS2 API.
*
* In order to enable support for Micrium OS backend
* the user must make sure SL_CATALOG_MICRIUMOS_KERNEL_PRESENT is defined.
* In order to enable support for FreeRTOS backend the user must make sure
* SL_CATALOG_FREERTOS_KERNEL_PRESENT is defined.
*
* Applications created using Simplicity Studio 5 the sl_component_catalog.h
* file will define one of the above in order to declare the presence
* of a specific RTOS.
*
* \note
* In order to use the Silicon Labs Hardware Acceleration plugins in
* multi-threaded applications, select
* <b>Mbed TLS support for EFM32/EFR32 crypto acceleration</b> component.
*
* \{
******************************************************************************/

#include "mbedtls/threading.h"
#include <stdbool.h>
Expand Down Expand Up @@ -160,7 +160,8 @@ THREADING_TakeMutexBlocking(mbedtls_threading_mutex_t *mutex) {
*
* \param mutex Pointer to the mutex being tested
*
* \return RTOS_ERR_NONE on success (= mutex successfully owned), error code otherwise.
* \return RTOS_ERR_NONE on success (= mutex successfully owned), error
* code otherwise.
*/
static inline int
THREADING_TakeMutexNonBlocking(mbedtls_threading_mutex_t *mutex) {
Expand Down Expand Up @@ -213,7 +214,8 @@ void mbedtls_threading_set_alt(
int (*mutex_unlock)(mbedtls_threading_mutex_t *));

/**
* \brief Helper function for setting up the mbed TLS threading subsystem
* \brief Helper function for setting up the mbed TLS threading
* subsystem
*/
static inline void THREADING_setup(void) {
mbedtls_threading_set_alt(&THREADING_InitMutex, &THREADING_FreeMutex,
Expand Down
Loading

0 comments on commit d2fb00e

Please sign in to comment.