Skip to content

Commit a46ad8f

Browse files
authored
Update osal_freertos.h
Fix FreeRTOS task switch even if not required (unitialized variable usage)
1 parent 159aa59 commit a46ad8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/osal/osal_freertos.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool osal_semaphore_post(osal_semaphore_t se
115115
}
116116
else
117117
{
118-
BaseType_t xHigherPriorityTaskWoken;
118+
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
119119
BaseType_t res = xSemaphoreGiveFromISR(sem_hdl, &xHigherPriorityTaskWoken);
120120

121121
#if CFG_TUSB_MCU == OPT_MCU_ESP32S2 || CFG_TUSB_MCU == OPT_MCU_ESP32S3
@@ -189,7 +189,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool osal_queue_send(osal_queue_t qhdl, void
189189
}
190190
else
191191
{
192-
BaseType_t xHigherPriorityTaskWoken;
192+
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
193193
BaseType_t res = xQueueSendToBackFromISR(qhdl, data, &xHigherPriorityTaskWoken);
194194

195195
#if CFG_TUSB_MCU == OPT_MCU_ESP32S2 || CFG_TUSB_MCU == OPT_MCU_ESP32S3

0 commit comments

Comments
 (0)