From c0744f2af3a44f750ed5255edf69e0a5ee09026b Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sun, 1 Oct 2023 03:54:27 +0200 Subject: [PATCH] perf: Use FreeRTOS mutex instead of binary semaphore (#3935) --- radio/src/FreeRTOSConfig.h | 2 +- radio/src/rtos.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/FreeRTOSConfig.h b/radio/src/FreeRTOSConfig.h index a751c99bc..7563cb953 100644 --- a/radio/src/FreeRTOSConfig.h +++ b/radio/src/FreeRTOSConfig.h @@ -41,7 +41,7 @@ extern uint32_t SystemCoreClock; #define configUSE_16_BIT_TICKS 0 #define configIDLE_SHOULD_YIELD 1 // Use notifications -#define configUSE_MUTEXES 0 +#define configUSE_MUTEXES 1 #define configQUEUE_REGISTRY_SIZE 0 #define configUSE_RECURSIVE_MUTEXES 0 #define configUSE_MALLOC_FAILED_HOOK 0 diff --git a/radio/src/rtos.h b/radio/src/rtos.h index 69c54aab8..dfb6218c4 100644 --- a/radio/src/rtos.h +++ b/radio/src/rtos.h @@ -206,7 +206,7 @@ extern "C++" { static inline void _RTOS_CREATE_MUTEX(RTOS_MUTEX_HANDLE* h) { - h->rtos_handle = xSemaphoreCreateBinaryStatic(&h->mutex_struct); + h->rtos_handle = xSemaphoreCreateMutexStatic(&h->mutex_struct); xSemaphoreGive(h->rtos_handle); }