From c88c6c2a45482d19f51ec0548ffe50e5b1203a82 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Mon, 6 Apr 2020 19:51:45 +0200 Subject: [PATCH] binary semaphore info printout added --- osal/FreeRTOS/BinarySemaphore.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osal/FreeRTOS/BinarySemaphore.cpp b/osal/FreeRTOS/BinarySemaphore.cpp index 631e4742..546c5a46 100644 --- a/osal/FreeRTOS/BinarySemaphore.cpp +++ b/osal/FreeRTOS/BinarySemaphore.cpp @@ -86,6 +86,7 @@ void BinarySemaphore::resetSemaphore() { } } +// Be careful with the stack size here. This is called from an ISR! ReturnValue_t BinarySemaphore::giveBinarySemaphoreFromISR(SemaphoreHandle_t semaphore, BaseType_t * higherPriorityTaskWoken) { if (semaphore == nullptr) { @@ -95,6 +96,10 @@ ReturnValue_t BinarySemaphore::giveBinarySemaphoreFromISR(SemaphoreHandle_t sema if (returncode == pdPASS) { if(*higherPriorityTaskWoken == pdPASS) { // Request context switch + // TODO: I don't know if this will ever happen but if it does, + // I want to to know in case this causes issues. If it doesn't + // we should remove this. + TRACE_INFO("Binary Semaphore: Higher priority task unblocked!"); TaskManagement::requestContextSwitch(CallContext::isr); } return HasReturnvaluesIF::RETURN_OK;