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:
Sudeep Mohanty
2025-08-14 16:05:05 +02:00
parent 4f90f3c507
commit c76cc9a24d
14 changed files with 25 additions and 78 deletions

View File

@@ -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

View File

@@ -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 );
/*

View File

@@ -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 );

View File

@@ -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 );

View File

@@ -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 );

View File

@@ -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 );