Skip to content

Commit

Permalink
Rename CPU to Core (FreeRTOS#849)
Browse files Browse the repository at this point in the history
This commit renames "CPU" to "Core" for any public facing API for consistency
with other SMP related APIs (e.g., "configNUMBER_OF_CORES").

Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
  • Loading branch information
Dazza0 and aggarg authored Oct 23, 2023
1 parent 9f4a0e3 commit fc7aca7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/FreeRTOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -2120,12 +2120,12 @@
#define traceRETURN_xTaskGetCurrentTaskHandle( xReturn )
#endif

#ifndef traceENTER_xTaskGetCurrentTaskHandleCPU
#define traceENTER_xTaskGetCurrentTaskHandleCPU( xCoreID )
#ifndef traceENTER_xTaskGetCurrentTaskHandleForCore
#define traceENTER_xTaskGetCurrentTaskHandleForCore( xCoreID )
#endif

#ifndef traceRETURN_xTaskGetCurrentTaskHandleCPU
#define traceRETURN_xTaskGetCurrentTaskHandleCPU( xReturn )
#ifndef traceRETURN_xTaskGetCurrentTaskHandleForCore
#define traceRETURN_xTaskGetCurrentTaskHandleForCore( xReturn )
#endif

#ifndef traceENTER_xTaskGetSchedulerState
Expand Down
2 changes: 1 addition & 1 deletion include/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -3539,7 +3539,7 @@ TaskHandle_t xTaskGetCurrentTaskHandle( void ) PRIVILEGED_FUNCTION;
/*
* Return the handle of the task running on specified core.
*/
TaskHandle_t xTaskGetCurrentTaskHandleCPU( BaseType_t xCoreID ) PRIVILEGED_FUNCTION;
TaskHandle_t xTaskGetCurrentTaskHandleForCore( BaseType_t xCoreID ) PRIVILEGED_FUNCTION;

/*
* Shortcut used by the queue implementation to prevent unnecessary call to
Expand Down
6 changes: 3 additions & 3 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -6425,18 +6425,18 @@ static void prvResetNextTaskUnblockTime( void )
return xReturn;
}

TaskHandle_t xTaskGetCurrentTaskHandleCPU( BaseType_t xCoreID )
TaskHandle_t xTaskGetCurrentTaskHandleForCore( BaseType_t xCoreID )
{
TaskHandle_t xReturn = NULL;

traceENTER_xTaskGetCurrentTaskHandleCPU( xCoreID );
traceENTER_xTaskGetCurrentTaskHandleForCore( xCoreID );

if( taskVALID_CORE_ID( xCoreID ) != pdFALSE )
{
xReturn = pxCurrentTCBs[ xCoreID ];
}

traceRETURN_xTaskGetCurrentTaskHandleCPU( xReturn );
traceRETURN_xTaskGetCurrentTaskHandleForCore( xReturn );

return xReturn;
}
Expand Down

0 comments on commit fc7aca7

Please sign in to comment.