|
|
|
@ -332,14 +332,22 @@ static void LockUnlockCallback(void *data, bool lock) { |
|
|
|
BaseType_t xHigherPriorityTaskWoken = pdFALSE; |
|
|
|
BaseType_t xHigherPriorityTaskWoken = pdFALSE; |
|
|
|
|
|
|
|
|
|
|
|
if (lock) { |
|
|
|
if (lock) { |
|
|
|
|
|
|
|
#if McuLib_CONFIG_CPU_IS_ESP32 |
|
|
|
|
|
|
|
if (xPortInIsrContext()) { |
|
|
|
|
|
|
|
#else |
|
|
|
if (xPortIsInsideInterrupt()) { |
|
|
|
if (xPortIsInsideInterrupt()) { |
|
|
|
|
|
|
|
#endif |
|
|
|
xSemaphoreTakeFromISR(McuLog_ConfigData.McuLog_Mutex, &xHigherPriorityTaskWoken); |
|
|
|
xSemaphoreTakeFromISR(McuLog_ConfigData.McuLog_Mutex, &xHigherPriorityTaskWoken); |
|
|
|
portYIELD_FROM_ISR(xHigherPriorityTaskWoken); |
|
|
|
portYIELD_FROM_ISR(xHigherPriorityTaskWoken); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
(void)xSemaphoreTakeRecursive(McuLog_ConfigData.McuLog_Mutex, portMAX_DELAY); |
|
|
|
(void)xSemaphoreTakeRecursive(McuLog_ConfigData.McuLog_Mutex, portMAX_DELAY); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
#if McuLib_CONFIG_CPU_IS_ESP32 |
|
|
|
|
|
|
|
if (xPortInIsrContext()) { |
|
|
|
|
|
|
|
#else |
|
|
|
if (xPortIsInsideInterrupt()) { |
|
|
|
if (xPortIsInsideInterrupt()) { |
|
|
|
|
|
|
|
#endif |
|
|
|
xSemaphoreGiveFromISR(McuLog_ConfigData.McuLog_Mutex, &xHigherPriorityTaskWoken); |
|
|
|
xSemaphoreGiveFromISR(McuLog_ConfigData.McuLog_Mutex, &xHigherPriorityTaskWoken); |
|
|
|
portYIELD_FROM_ISR(xHigherPriorityTaskWoken); |
|
|
|
portYIELD_FROM_ISR(xHigherPriorityTaskWoken); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
@ -480,4 +488,3 @@ void McuLog_Deinit(void) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif /* McuLog_CONFIG_IS_ENABLED */ |
|
|
|
#endif /* McuLog_CONFIG_IS_ENABLED */ |
|
|
|
|
|
|
|
|
|
|
|
|