mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 10:30:58 +02:00
remove(freertos): Remove legacy vPortCleanUpTCB user hook
This commit removes support for the vPortCleanUpTCB() user hook as well as drops support for associated Kconfig option, CONFIG_FREERTOS_STATIC_TASK_CLEAN_UP.
This commit is contained in:
@@ -820,6 +820,12 @@ void vPortTLSPointersDelCb( void *pxTCB )
|
||||
|
||||
void vPortCleanUpTCB ( void *pxTCB )
|
||||
{
|
||||
#if ( CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK )
|
||||
/* Call the user defined task pre-deletion hook */
|
||||
extern void vTaskPreDeletionHook( void * pxTCB );
|
||||
vTaskPreDeletionHook( pxTCB );
|
||||
#endif /* CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK */
|
||||
|
||||
#if ( CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS )
|
||||
/* Call TLS pointers deletion callbacks */
|
||||
vPortTLSPointersDelCb( pxTCB );
|
||||
|
@@ -173,9 +173,6 @@ static inline BaseType_t __attribute__((always_inline)) xPortGetCoreID( void );
|
||||
* The portCLEAN_UP_TCB() macro is called in prvDeleteTCB() right before a
|
||||
* deleted task's memory is freed. We map that macro to this internal function
|
||||
* so that IDF FreeRTOS ports can inject some task pre-deletion operations.
|
||||
*
|
||||
* @note We can't use vPortCleanUpTCB() due to API compatibility issues. See
|
||||
* CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP. Todo: IDF-8097
|
||||
*/
|
||||
void vPortTCBPreDeleteHook( void *pxTCB );
|
||||
|
||||
|
@@ -270,16 +270,6 @@ void vPortTCBPreDeleteHook( void *pxTCB )
|
||||
vTaskPreDeletionHook( pxTCB );
|
||||
#endif /* CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK */
|
||||
|
||||
#if ( CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP )
|
||||
/*
|
||||
* If the user is using the legacy task pre-deletion hook, call it.
|
||||
* Todo: Will be removed in IDF-8097
|
||||
*/
|
||||
#warning "CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is deprecated. Use CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK instead."
|
||||
extern void vPortCleanUpTCB( void * pxTCB );
|
||||
vPortCleanUpTCB( pxTCB );
|
||||
#endif /* CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP */
|
||||
|
||||
#if ( CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS )
|
||||
/* Call TLS pointers deletion callbacks */
|
||||
vPortTLSPointersDelCb( pxTCB );
|
||||
|
@@ -143,9 +143,6 @@ static inline BaseType_t __attribute__((always_inline)) xPortGetCoreID( void );
|
||||
* The portCLEAN_UP_TCB() macro is called in prvDeleteTCB() right before a
|
||||
* deleted task's memory is freed. We map that macro to this internal function
|
||||
* so that IDF FreeRTOS ports can inject some task pre-deletion operations.
|
||||
*
|
||||
* @note We can't use vPortCleanUpTCB() due to API compatibility issues. See
|
||||
* CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP. Todo: IDF-8097
|
||||
*/
|
||||
void vPortTCBPreDeleteHook( void *pxTCB );
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -296,16 +296,6 @@ void vPortTCBPreDeleteHook( void *pxTCB )
|
||||
vTaskPreDeletionHook( pxTCB );
|
||||
#endif /* CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK */
|
||||
|
||||
#if ( CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP )
|
||||
/*
|
||||
* If the user is using the legacy task pre-deletion hook, call it.
|
||||
* Todo: Will be removed in IDF-8097
|
||||
*/
|
||||
#warning "CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is deprecated. Use CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK instead."
|
||||
extern void vPortCleanUpTCB( void * pxTCB );
|
||||
vPortCleanUpTCB( pxTCB );
|
||||
#endif /* CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP */
|
||||
|
||||
#if ( CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS )
|
||||
/* Call TLS pointers deletion callbacks */
|
||||
vPortTLSPointersDelCb( pxTCB );
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -115,12 +115,6 @@ static inline void vPortAssertIfInISR(void)
|
||||
*/
|
||||
#define portASSERT_IF_IN_ISR() vPortAssertIfInISR()
|
||||
|
||||
#if CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP
|
||||
/* If enabled, users must provide an implementation of vPortCleanUpTCB() */
|
||||
extern void vPortCleanUpTCB ( void *pxTCB );
|
||||
#define portCLEAN_UP_TCB( pxTCB ) vPortCleanUpTCB( pxTCB )
|
||||
#endif /* CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* SPDX-FileContributor: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileContributor: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
@@ -422,6 +422,12 @@ void vPortThreadDying( void *pxTaskToDelete, volatile BaseType_t *pxPendYield )
|
||||
|
||||
void vPortCancelThread( void *pxTaskToDelete )
|
||||
{
|
||||
#if ( CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK )
|
||||
/* Call the user defined task pre-deletion hook before canceling the thread */
|
||||
extern void vTaskPreDeletionHook( void * pxTCB );
|
||||
vTaskPreDeletionHook( pxTaskToDelete );
|
||||
#endif /* CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK */
|
||||
|
||||
Thread_t *pxThreadToCancel = prvGetThreadFromTask( pxTaskToDelete );
|
||||
|
||||
/*
|
||||
|
@@ -450,9 +450,6 @@ FORCE_INLINE_ATTR BaseType_t xPortGetCoreID(void)
|
||||
* The portCLEAN_UP_TCB() macro is called in prvDeleteTCB() right before a
|
||||
* deleted task's memory is freed. We map that macro to this internal function
|
||||
* so that IDF FreeRTOS ports can inject some task pre-deletion operations.
|
||||
*
|
||||
* @note We can't use vPortCleanUpTCB() due to API compatibility issues. See
|
||||
* CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP. Todo: IDF-8097
|
||||
*/
|
||||
void vPortTCBPreDeleteHook( void *pxTCB );
|
||||
|
||||
|
@@ -736,16 +736,6 @@ void vPortTCBPreDeleteHook( void *pxTCB )
|
||||
vTaskPreDeletionHook( pxTCB );
|
||||
#endif /* CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK */
|
||||
|
||||
#if ( CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP )
|
||||
/*
|
||||
* If the user is using the legacy task pre-deletion hook, call it.
|
||||
* Todo: Will be removed in IDF-8097
|
||||
*/
|
||||
#warning "CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is deprecated. Use CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK instead."
|
||||
extern void vPortCleanUpTCB( void * pxTCB );
|
||||
vPortCleanUpTCB( pxTCB );
|
||||
#endif /* CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP */
|
||||
|
||||
#if ( CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS )
|
||||
/* Call TLS pointers deletion callbacks */
|
||||
vPortTLSPointersDelCb( pxTCB );
|
||||
|
@@ -386,9 +386,6 @@ FORCE_INLINE_ATTR BaseType_t xPortGetCoreID(void);
|
||||
* The portCLEAN_UP_TCB() macro is called in prvDeleteTCB() right before a
|
||||
* deleted task's memory is freed. We map that macro to this internal function
|
||||
* so that IDF FreeRTOS ports can inject some task pre-deletion operations.
|
||||
*
|
||||
* @note We can't use vPortCleanUpTCB() due to API compatibility issues. See
|
||||
* CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP. Todo: IDF-8097
|
||||
*/
|
||||
void vPortTCBPreDeleteHook( void *pxTCB );
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* SPDX-FileContributor: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileContributor: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
@@ -649,16 +649,6 @@ void vPortTCBPreDeleteHook( void *pxTCB )
|
||||
vTaskPreDeletionHook( pxTCB );
|
||||
#endif /* CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK */
|
||||
|
||||
#if ( CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP )
|
||||
/*
|
||||
* If the user is using the legacy task pre-deletion hook, call it.
|
||||
* Todo: Will be removed in IDF-8097
|
||||
*/
|
||||
#warning "CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is deprecated. Use CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK instead."
|
||||
extern void vPortCleanUpTCB( void * pxTCB );
|
||||
vPortCleanUpTCB( pxTCB );
|
||||
#endif /* CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP */
|
||||
|
||||
#if ( CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS )
|
||||
/* Call TLS pointers deletion callbacks */
|
||||
vPortTLSPointersDelCb( pxTCB );
|
||||
|
@@ -405,10 +405,7 @@ menu "FreeRTOS"
|
||||
off to save space in the TCB memory.
|
||||
|
||||
config FREERTOS_TASK_PRE_DELETION_HOOK
|
||||
# This option is a replacement for FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP (which is now deprecated). If the
|
||||
# deprecated option is defined, we hide this option to avoid multiple pre-deletion hooks from running.
|
||||
bool "Enable task pre-deletion hook"
|
||||
depends on !FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP
|
||||
default n
|
||||
help
|
||||
Enable this option to make FreeRTOS call a user provided hook function right before it deletes a task
|
||||
@@ -418,18 +415,6 @@ menu "FreeRTOS"
|
||||
If this config option is enabled, users must define a ``void vTaskPreDeletionHook( void * pxTCB )``
|
||||
hook function in their application.
|
||||
|
||||
config FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP
|
||||
# This option is deprecated (replaced by FREERTOS_TASK_PRE_DELETION_HOOK) but still exists to maintain
|
||||
# compatibility. Todo: Remove by v6.0 (see IDF-8097).
|
||||
bool "Enable static task clean up hook (DEPRECATED)"
|
||||
default n
|
||||
help
|
||||
THIS OPTION IS DEPRECATED. Use FREERTOS_TASK_PRE_DELETION_HOOK instead.
|
||||
|
||||
Enable this option to make FreeRTOS call the static task clean up hook when a task is deleted.
|
||||
|
||||
Note: Users will need to provide a ``void vPortCleanUpTCB ( void *pxTCB )`` callback
|
||||
|
||||
config FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER
|
||||
# This feature is innately supported in FreeRTOS SMP, and hence not available as a config option when
|
||||
# FreeRTOS SMP is enabled.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# sdkconfig replacement configurations for deprecated options formatted as
|
||||
# CONFIG_DEPRECATED_OPTION CONFIG_NEW_OPTION
|
||||
|
||||
CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP
|
||||
CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK
|
||||
CONFIG_TIMER_TASK_PRIORITY CONFIG_FREERTOS_TIMER_TASK_PRIORITY
|
||||
CONFIG_TIMER_TASK_STACK_DEPTH CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH
|
||||
CONFIG_TIMER_QUEUE_LENGTH CONFIG_FREERTOS_TIMER_QUEUE_LENGTH
|
||||
|
@@ -560,3 +560,11 @@
|
||||
-
|
||||
re_variables: ['xTaskNotifyWait']
|
||||
hint_variables: ['xTaskNotifyWait', 'the macro xTaskNotifyWait']
|
||||
|
||||
-
|
||||
re: "(no previous prototype for 'vTaskPreDeletionHook'|undefined reference to `vTaskPreDeletionHook')"
|
||||
hint: "CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK is enabled but your project does not provide vTaskPreDeletionHook( void * pxTCB ). Either disable the Kconfig option or implement the hook."
|
||||
|
||||
-
|
||||
re: "error: implicit declaration of function 'vPortCleanUpTCB'"
|
||||
hint: "The legacy FreeRTOS hook vPortCleanUpTCB() has been removed from ESP-IDF. Use CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK with vTaskPreDeletionHook( void * pxTCB ) instead."
|
||||
|
Reference in New Issue
Block a user