freertos: Fix TLSP deletion callback log

Currently, portCLEAN_UP_TCB() is called in a critical section. This commit updates
vPortTLSPointersDelCb() to use an EARLY log to prevent a crash.
This commit is contained in:
Darian Leung
2022-05-24 19:01:14 +08:00
parent f3d06ad78d
commit 64469affcd

View File

@@ -600,7 +600,8 @@ void vPortTLSPointersDelCb( void * pxTCB )
{ {
/* In case the TLSP deletion callback has been overwritten by a TLS pointer, gracefully abort. */ /* In case the TLSP deletion callback has been overwritten by a TLS pointer, gracefully abort. */
if ( !esp_ptr_executable( pvThreadLocalStoragePointersDelCallback[ x ] ) ) { if ( !esp_ptr_executable( pvThreadLocalStoragePointersDelCallback[ x ] ) ) {
ESP_LOGE("FreeRTOS", "Fatal error: TLSP deletion callback at index %d overwritten with non-excutable pointer %p", x, pvThreadLocalStoragePointersDelCallback[ x ]); // We call EARLY log here as currently portCLEAN_UP_TCB() is called in a critical section
ESP_EARLY_LOGE("FreeRTOS", "Fatal error: TLSP deletion callback at index %d overwritten with non-excutable pointer %p", x, pvThreadLocalStoragePointersDelCallback[ x ]);
abort(); abort();
} }