mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Make the pcObjectGetName() API function naming consistent - so rename pcTaskGetTaskName() to pcTaskGetName(), rename pcTimerGetTimerName() to pcTimerGetName() and add a #defines in FreeRTOS.h to make the changes backward compatible.
This commit is contained in:
parent
aeb03e5fa0
commit
b9b64c0889
|
@ -181,10 +181,6 @@ extern "C" {
|
|||
#define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder
|
||||
#endif
|
||||
|
||||
#ifndef INCLUDE_pcTaskGetTaskName
|
||||
#define INCLUDE_pcTaskGetTaskName 0
|
||||
#endif
|
||||
|
||||
#ifndef INCLUDE_xTaskGetTaskHandle
|
||||
#define INCLUDE_xTaskGetTaskHandle 0
|
||||
#endif
|
||||
|
@ -318,7 +314,7 @@ extern "C" {
|
|||
#if ( configQUEUE_REGISTRY_SIZE < 1 )
|
||||
#define vQueueAddToRegistry( xQueue, pcName )
|
||||
#define vQueueUnregisterQueue( xQueue )
|
||||
#define pcQueueGetQueueName( xQueue )
|
||||
#define pcQueueGetName( xQueue )
|
||||
#endif
|
||||
|
||||
#ifndef portPOINTER_SIZE_TYPE
|
||||
|
@ -839,6 +835,8 @@ V8 if desired. */
|
|||
#define xCoRoutineHandle CoRoutineHandle_t
|
||||
#define pdTASK_HOOK_CODE TaskHookFunction_t
|
||||
#define portTICK_RATE_MS portTICK_PERIOD_MS
|
||||
#define pcTaskGetTaskName pcTaskGetName
|
||||
#define pcTimerGetTimerName pcTimerGetName
|
||||
|
||||
/* Backward compatibility within the scheduler code only - these definitions
|
||||
are not really required but are included for completeness. */
|
||||
|
|
|
@ -143,7 +143,7 @@ only for ports that are using the MPU. */
|
|||
#define xTimerIsTimerActive MPU_xTimerIsTimerActive
|
||||
#define xTimerGetTimerDaemonTaskHandle MPU_xTimerGetTimerDaemonTaskHandle
|
||||
#define xTimerPendFunctionCall MPU_xTimerPendFunctionCall
|
||||
#define pcTimerGetTimerName MPU_pcTimerGetTimerName
|
||||
#define pcTimerGetName MPU_pcTimerGetName
|
||||
#define xTimerGenericCommand MPU_xTimerGenericCommand
|
||||
|
||||
#define xEventGroupCreate MPU_xEventGroupCreate
|
||||
|
|
|
@ -1617,7 +1617,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) PRIVILEGED_FUNCTION
|
|||
|
||||
/*
|
||||
* The queue registry is provided as a means for kernel aware debuggers to
|
||||
* locate queues, semaphores and mutexes. Call pcQueueGetQueueName() to look
|
||||
* locate queues, semaphores and mutexes. Call pcQueueGetName() to look
|
||||
* up and return the name of a queue in the queue registry from the queue's
|
||||
* handle.
|
||||
*
|
||||
|
@ -1627,7 +1627,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) PRIVILEGED_FUNCTION
|
|||
* returned.
|
||||
*/
|
||||
#if( configQUEUE_REGISTRY_SIZE > 0 )
|
||||
const char *pcQueueGetQueueName( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
const char *pcQueueGetName( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -1302,17 +1302,16 @@ UBaseType_t uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;
|
|||
|
||||
/**
|
||||
* task. h
|
||||
* <PRE>char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery );</PRE>
|
||||
* <PRE>char *pcTaskGetName( TaskHandle_t xTaskToQuery );</PRE>
|
||||
*
|
||||
* @return The text (human readable) name of the task referenced by the handle
|
||||
* xTaskToQuery. A task can query its own name by either passing in its own
|
||||
* handle, or by setting xTaskToQuery to NULL. INCLUDE_pcTaskGetTaskName must be
|
||||
* set to 1 in FreeRTOSConfig.h for pcTaskGetTaskName() to be available.
|
||||
* handle, or by setting xTaskToQuery to NULL.
|
||||
*
|
||||
* \defgroup pcTaskGetTaskName pcTaskGetTaskName
|
||||
* \defgroup pcTaskGetName pcTaskGetName
|
||||
* \ingroup TaskUtils
|
||||
*/
|
||||
char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
char *pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
|
||||
/**
|
||||
* task. h
|
||||
|
|
|
@ -1256,7 +1256,7 @@ BaseType_t xTimerPendFunctionCallFromISR( PendedFunction_t xFunctionToPend, void
|
|||
BaseType_t xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* const char * const pcTimerGetTimerName( TimerHandle_t xTimer );
|
||||
* const char * const pcTimerGetName( TimerHandle_t xTimer );
|
||||
*
|
||||
* Returns the name that was assigned to a timer when the timer was created.
|
||||
*
|
||||
|
@ -1264,7 +1264,7 @@ BaseType_t xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, void *pvPar
|
|||
*
|
||||
* @return The name assigned to the timer specified by the xTimer parameter.
|
||||
*/
|
||||
const char * pcTimerGetTimerName( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
const char * pcTimerGetName( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
|
||||
/**
|
||||
* TickType_t xTimerGetPeriod( TimerHandle_t xTimer );
|
||||
|
|
|
@ -151,7 +151,7 @@ extern void *pxCurrentTCB;
|
|||
/* First fill in the name and handle of the task that was in the Running
|
||||
state when the exception occurred. */
|
||||
xRegisterDump.xCurrentTaskHandle = pxCurrentTCB;
|
||||
xRegisterDump.pcCurrentTaskName = pcTaskGetTaskName( NULL );
|
||||
xRegisterDump.pcCurrentTaskName = pcTaskGetName( NULL );
|
||||
|
||||
configASSERT( pulStackPointerOnFunctionEntry );
|
||||
|
||||
|
|
|
@ -2283,7 +2283,7 @@ BaseType_t xReturn;
|
|||
|
||||
#if ( configQUEUE_REGISTRY_SIZE > 0 )
|
||||
|
||||
const char *pcQueueGetQueueName( QueueHandle_t xQueue ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
const char *pcQueueGetName( QueueHandle_t xQueue ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
{
|
||||
UBaseType_t ux;
|
||||
const char *pcReturn = NULL; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
|
|
|
@ -2063,20 +2063,16 @@ UBaseType_t uxTaskGetNumberOfTasks( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( INCLUDE_pcTaskGetTaskName == 1 )
|
||||
char *pcTaskGetName( TaskHandle_t xTaskToQuery ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
{
|
||||
TCB_t *pxTCB;
|
||||
|
||||
char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
{
|
||||
TCB_t *pxTCB;
|
||||
|
||||
/* If null is passed in here then the name of the calling task is being
|
||||
queried. */
|
||||
pxTCB = prvGetTCBFromHandle( xTaskToQuery );
|
||||
configASSERT( pxTCB );
|
||||
return &( pxTCB->pcTaskName[ 0 ] );
|
||||
}
|
||||
|
||||
#endif /* INCLUDE_pcTaskGetTaskName */
|
||||
/* If null is passed in here then the name of the calling task is being
|
||||
queried. */
|
||||
pxTCB = prvGetTCBFromHandle( xTaskToQuery );
|
||||
configASSERT( pxTCB );
|
||||
return &( pxTCB->pcTaskName[ 0 ] );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( INCLUDE_xTaskGetTaskHandle == 1 )
|
||||
|
|
|
@ -453,7 +453,7 @@ TickType_t xReturn;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
const char * pcTimerGetTimerName( TimerHandle_t xTimer ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
const char * pcTimerGetName( TimerHandle_t xTimer ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
{
|
||||
Timer_t *pxTimer = ( Timer_t * ) xTimer;
|
||||
|
||||
|
|
Loading…
Reference in a new issue