diff --git a/components/freertos/include/freertos/task.h b/components/freertos/include/freertos/task.h index a2cef32546..9135b76f01 100644 --- a/components/freertos/include/freertos/task.h +++ b/components/freertos/include/freertos/task.h @@ -3346,7 +3346,7 @@ BaseType_t xTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem, * Sets the pointer to the current TCB to the TCB of the highest priority task * that is ready to run. */ -void vTaskSwitchContext( void ) PRIVILEGED_FUNCTION; +portDONT_DISCARD void vTaskSwitchContext( void ) PRIVILEGED_FUNCTION; /* * THESE FUNCTIONS MUST NOT BE USED FROM APPLICATION CODE. THEY ARE USED BY diff --git a/tools/mocks/freertos/mock/mock_config.yaml b/tools/mocks/freertos/mock/mock_config.yaml index a8027fe42f..dad1a6e2a4 100644 --- a/tools/mocks/freertos/mock/mock_config.yaml +++ b/tools/mocks/freertos/mock/mock_config.yaml @@ -18,3 +18,4 @@ # following function is disabled by configTHREAD_LOCAL_STORAGE_DELETE_CALLBACKS - '(?:vTaskSetThreadLocalStoragePointerAndDelCallback\s*\([\s\w\*_,]*\))' - PRIVILEGED_FUNCTION + - portDONT_DISCARD