summaryrefslogtreecommitdiff
path: root/FreeRTOS/Source
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2013-07-18 14:41:15 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2013-07-18 14:41:15 +0000
commit29791da3f77e873a4685f19f4ac6d23d4b91bfe0 (patch)
treea5d70039f407156f406e34ae5db10f18dfa4c41d /FreeRTOS/Source
parent2f4fcf34aee3993ca196b578f805c7c19f72dfd6 (diff)
downloadfreertos-29791da3f77e873a4685f19f4ac6d23d4b91bfe0.tar.gz
Rename xTaskGetSystemState() uxTaskGetSystemState().
git-svn-id: http://svn.code.sf.net/p/freertos/code/trunk@1988 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'FreeRTOS/Source')
-rw-r--r--FreeRTOS/Source/include/mpu_wrappers.h2
-rw-r--r--FreeRTOS/Source/include/task.h43
-rw-r--r--FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c6
-rw-r--r--FreeRTOS/Source/portable/MemMang/heap_2.c2
-rw-r--r--FreeRTOS/Source/tasks.c20
5 files changed, 37 insertions, 36 deletions
diff --git a/FreeRTOS/Source/include/mpu_wrappers.h b/FreeRTOS/Source/include/mpu_wrappers.h
index dcc1f3bc8..1a556f034 100644
--- a/FreeRTOS/Source/include/mpu_wrappers.h
+++ b/FreeRTOS/Source/include/mpu_wrappers.h
@@ -98,7 +98,7 @@ only for ports that are using the MPU. */
#define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle
#define xTaskGetSchedulerState MPU_xTaskGetSchedulerState
#define xTaskGetIdleTaskHandle MPU_xTaskGetIdleTaskHandle
- #define xTaskGetSystemState MPU_xTaskGetSystemState
+ #define uxTaskGetSystemState MPU_uxTaskGetSystemState
#define xQueueGenericCreate MPU_xQueueGenericCreate
#define xQueueCreateMutex MPU_xQueueCreateMutex
diff --git a/FreeRTOS/Source/include/task.h b/FreeRTOS/Source/include/task.h
index ee7421068..3e5a5dcb1 100644
--- a/FreeRTOS/Source/include/task.h
+++ b/FreeRTOS/Source/include/task.h
@@ -137,16 +137,16 @@ typedef struct xTASK_PARAMTERS
xMemoryRegion xRegions[ portNUM_CONFIGURABLE_REGIONS ];
} xTaskParameters;
-/* Used with the xTaskGetSystemState() function to return the state of each task
+/* Used with the uxTaskGetSystemState() function to return the state of each task
in the system. */
typedef struct xTASK_STATUS
{
xTaskHandle xHandle; /* The handle of the task to which the rest of the information in the structure relates. */
- const signed char *pcTaskName; /* A pointer to the task's name. This valid will be invalid if the task was deleted since the structure was populated! */
+ const signed char *pcTaskName; /* A pointer to the task's name. This value will be invalid if the task was deleted since the structure was populated! */
unsigned portBASE_TYPE xTaskNumber; /* A number unique to the task. */
eTaskState eCurrentState; /* The state in which the task existed when the structure was populated. */
unsigned portBASE_TYPE uxCurrentPriority; /* The priority at which the task was running (may be inherited) when the structure was populated. */
- unsigned portBASE_TYPE uxBasePriority; /* The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex. Only valid is configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */
+ unsigned portBASE_TYPE uxBasePriority; /* The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex. Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */
unsigned long ulRunTimeCounter; /* The total run time allocated to the task so far, as defined by the run time stats clock. See http://www.freertos.org/rtos-run-time-stats.html. Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */
unsigned short usStackHighWaterMark; /* The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */
} xTaskStatusType;
@@ -1145,9 +1145,9 @@ xTaskHandle xTaskGetIdleTaskHandle( void );
/**
* configUSE_TRACE_FACILITY must bet defined as 1 in FreeRTOSConfig.h for
- * xTaskGetSystemState() to be available.
+ * uxTaskGetSystemState() to be available.
*
- * xTaskGetSystemState() populates an xTaskStatusType structure for each task in
+ * uxTaskGetSystemState() populates an xTaskStatusType structure for each task in
* the system. xTaskStatusType structures contain, among other things, members
* for the task handle, task name, task priority, task state, and total amount
* of run time consumed by the task. See the xTaskStatusType structure
@@ -1157,29 +1157,30 @@ xTaskHandle xTaskGetIdleTaskHandle( void );
* the scheduler remaining suspended for an extended period.
*
* @param pxTaskStatusArray A pointer to an array of xTaskStatusType structures.
- * The array contain at least one xTaskStatusType structure for each task that
- * is under the control of the RTOS. The number of tasks under the control of
- * the RTOS can be determined using the uxTaskGetNumberOfTasks() API function.
+ * The array must contain at least one xTaskStatusType structure for each task
+ * that is under the control of the RTOS. The number of tasks under the control
+ * of the RTOS can be determined using the uxTaskGetNumberOfTasks() API function.
*
* @param uxArraySize The size of the array pointed to by the pxTaskStatusArray
* parameter. The size is specified as the number of indexes in the array, or
* the number of xTaskStatusType structures contained in the array, not by the
* number of bytes in the array.
*
- * @param pultotalRunTime If configGENERATE_RUN_TIME_STATS is set to 1 in
- * FreeRTOSConfig.h then *pulTotalRunTime is set by xTaskGetSystemState() to the
+ * @param pulTotalRunTime If configGENERATE_RUN_TIME_STATS is set to 1 in
+ * FreeRTOSConfig.h then *pulTotalRunTime is set by uxTaskGetSystemState() to the
* total run time (as defined by the run time stats clock, see
* http://www.freertos.org/rtos-run-time-stats.html) since the target booted.
+ * pulTotalRunTime can be set to NULL to omit the total run time information.
*
* @return The number of xTaskStatusType structures that were populated by
- * xTaskGetSystemState(). This should equal the number returned by the
+ * uxTaskGetSystemState(). This should equal the number returned by the
* uxTaskGetNumberOfTasks() API function, but will be zero if the value passed
* in the uxArraySize parameter was too small.
*
* Example usage:
<pre>
// This example demonstrates how a human readable table of run time stats
- // information is generated from raw data provided by xTaskGetSystemState().
+ // information is generated from raw data provided by uxTaskGetSystemState().
// The human readable table is written to pcWriteBuffer
void vTaskGetRunTimeStats( signed char *pcWriteBuffer )
{
@@ -1192,7 +1193,7 @@ xTaskHandle xTaskGetIdleTaskHandle( void );
// Take a snapshot of the number of tasks in case it changes while this
// function is executing.
- uxArraySize = uxCurrentNumberOfTasks;
+ uxArraySize = uxCurrentNumberOfTasks();
// Allocate a xTaskStatusType structure for each task. An array could be
// allocated statically at compile time.
@@ -1201,7 +1202,7 @@ xTaskHandle xTaskGetIdleTaskHandle( void );
if( pxTaskStatusArray != NULL )
{
// Generate raw status information about each task.
- uxArraySize = xTaskGetSystemState( pxTaskStatusArray, uxArraySize, &ulTotalRunTime );
+ uxArraySize = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, &ulTotalRunTime );
// For percentage calculations.
ulTotalRunTime /= 100UL;
@@ -1239,7 +1240,7 @@ xTaskHandle xTaskGetIdleTaskHandle( void );
}
</pre>
*/
-unsigned portBASE_TYPE xTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime );
+unsigned portBASE_TYPE uxTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime );
/**
* task. h
@@ -1263,8 +1264,8 @@ unsigned portBASE_TYPE xTaskGetSystemState( xTaskStatusType *pxTaskStatusArray,
* This function is provided for convenience only, and is used by many of the
* demo applications. Do not consider it to be part of the scheduler.
*
- * vTaskList() calls xTaskGetSystemState(), then formats part of the
- * xTaskGetSystemState() output into a human readable table that displays task
+ * vTaskList() calls uxTaskGetSystemState(), then formats part of the
+ * uxTaskGetSystemState() output into a human readable table that displays task
* names, states and stack usage.
*
* vTaskList() has a dependency on the sprintf() C library function that might
@@ -1274,7 +1275,7 @@ unsigned portBASE_TYPE xTaskGetSystemState( xTaskStatusType *pxTaskStatusArray,
* FreeRTOS/Demo sub-directories in a file called printf-stdarg.c (note
* printf-stdarg.c does not provide a full snprintf() implementation!).
*
- * It is recommended that production systems call xTaskGetSystemState()
+ * It is recommended that production systems call uxTaskGetSystemState()
* directly to get access to raw stats data, rather than indirectly through a
* call to vTaskList().
*
@@ -1316,8 +1317,8 @@ void vTaskList( signed char *pcWriteBuffer ) PRIVILEGED_FUNCTION;
* This function is provided for convenience only, and is used by many of the
* demo applications. Do not consider it to be part of the scheduler.
*
- * vTaskGetRunTimeStats() calls xTaskGetSystemState(), then formats part of the
- * xTaskGetSystemState() output into a human readable table that displays the
+ * vTaskGetRunTimeStats() calls uxTaskGetSystemState(), then formats part of the
+ * uxTaskGetSystemState() output into a human readable table that displays the
* amount of time each task has spent in the Running state in both absolute and
* percentage terms.
*
@@ -1328,7 +1329,7 @@ void vTaskList( signed char *pcWriteBuffer ) PRIVILEGED_FUNCTION;
* FreeRTOS/Demo sub-directories in a file called printf-stdarg.c (note
* printf-stdarg.c does not provide a full snprintf() implementation!).
*
- * It is recommended that production systems call xTaskGetSystemState() directly
+ * It is recommended that production systems call uxTaskGetSystemState() directly
* to get access to raw stats data, rather than indirectly through a call to
* vTaskGetRunTimeStats().
*
diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c
index 748b67b2d..651a1111a 100644
--- a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c
+++ b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c
@@ -193,7 +193,7 @@ unsigned portBASE_TYPE MPU_uxTaskGetStackHighWaterMark( xTaskHandle xTask );
xTaskHandle MPU_xTaskGetCurrentTaskHandle( void );
portBASE_TYPE MPU_xTaskGetSchedulerState( void );
xTaskHandle MPU_xTaskGetIdleTaskHandle( void );
-unsigned portBASE_TYPE MPU_xTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime );
+unsigned portBASE_TYPE MPU_uxTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime );
xQueueHandle MPU_xQueueGenericCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize, unsigned char ucQueueType );
signed portBASE_TYPE MPU_xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition );
portBASE_TYPE MPU_xQueueGenericReset( xQueueHandle pxQueue, portBASE_TYPE xNewQueue );
@@ -910,12 +910,12 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
/*-----------------------------------------------------------*/
#if ( configUSE_TRACE_FACILITY == 1 )
- unsigned portBASE_TYPE MPU_xTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime )
+ unsigned portBASE_TYPE MPU_uxTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime )
{
unsigned portBASE_TYPE uxReturn;
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
- uxReturn = xTaskGetSystemState( pxTaskStatusArray, uxArraySize, pulTotalRunTime );
+ uxReturn = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, pulTotalRunTime );
portRESET_PRIVILEGE( xRunningPrivileged );
return xReturn;
}
diff --git a/FreeRTOS/Source/portable/MemMang/heap_2.c b/FreeRTOS/Source/portable/MemMang/heap_2.c
index e2c6c7f68..cb119e6e7 100644
--- a/FreeRTOS/Source/portable/MemMang/heap_2.c
+++ b/FreeRTOS/Source/portable/MemMang/heap_2.c
@@ -66,7 +66,7 @@
* A sample implementation of pvPortMalloc() and vPortFree() that permits
* allocated blocks to be freed, but does not combine adjacent free blocks
* into a single larger block (and so will fragment memory). See heap_4.c for
- * an aquivalent that does combine adjacent blocks into single larger blocks.
+ * an equivalent that does combine adjacent blocks into single larger blocks.
*
* See heap_1.c, heap_3.c and heap_4.c for alternative implementations, and the
* memory management pages of http://www.FreeRTOS.org for more information.
diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c
index 1c37c85bd..1b873e77d 100644
--- a/FreeRTOS/Source/tasks.c
+++ b/FreeRTOS/Source/tasks.c
@@ -86,7 +86,7 @@ privileged Vs unprivileged linkage and placement. */
#if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS == 1 ) )
/* At the bottom of this file are two optional functions that can be used
to generate human readable text from the raw data generated by the
- xTaskGetSystemState() function. Note the formatting functions are provided
+ uxTaskGetSystemState() function. Note the formatting functions are provided
for convenience only, and are NOT considered part of the kernel. */
#include <stdio.h>
#endif /* ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS == 1 ) ) */
@@ -1472,7 +1472,7 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
#if ( configUSE_TRACE_FACILITY == 1 )
- unsigned portBASE_TYPE xTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime )
+ unsigned portBASE_TYPE uxTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime )
{
unsigned portBASE_TYPE uxTask = 0, uxQueue = configMAX_PRIORITIES;
@@ -2755,8 +2755,8 @@ tskTCB *pxNewTCB;
* of the demo applications. Do not consider it to be part of the
* scheduler.
*
- * vTaskList() calls xTaskGetSystemState(), then formats part of the
- * xTaskGetSystemState() output into a human readable table that
+ * vTaskList() calls uxTaskGetSystemState(), then formats part of the
+ * uxTaskGetSystemState() output into a human readable table that
* displays task names, states and stack usage.
*
* vTaskList() has a dependency on the sprintf() C library function that
@@ -2767,7 +2767,7 @@ tskTCB *pxNewTCB;
* printf-stdarg.c (note printf-stdarg.c does not provide a full
* snprintf() implementation!).
*
- * It is recommended that production systems call xTaskGetSystemState()
+ * It is recommended that production systems call uxTaskGetSystemState()
* directly to get access to raw stats data, rather than indirectly
* through a call to vTaskList().
*/
@@ -2786,7 +2786,7 @@ tskTCB *pxNewTCB;
if( pxTaskStatusArray != NULL )
{
/* Generate the (binary) data. */
- uxArraySize = xTaskGetSystemState( pxTaskStatusArray, uxArraySize, NULL );
+ uxArraySize = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, NULL );
/* Create a human readable table from the binary data. */
for( x = 0; x < uxArraySize; x++ )
@@ -2838,8 +2838,8 @@ tskTCB *pxNewTCB;
* of the demo applications. Do not consider it to be part of the
* scheduler.
*
- * vTaskGetRunTimeStats() calls xTaskGetSystemState(), then formats part
- * of the xTaskGetSystemState() output into a human readable table that
+ * vTaskGetRunTimeStats() calls uxTaskGetSystemState(), then formats part
+ * of the uxTaskGetSystemState() output into a human readable table that
* displays the amount of time each task has spent in the Running state
* in both absolute and percentage terms.
*
@@ -2851,7 +2851,7 @@ tskTCB *pxNewTCB;
* a file called printf-stdarg.c (note printf-stdarg.c does not provide
* a full snprintf() implementation!).
*
- * It is recommended that production systems call xTaskGetSystemState()
+ * It is recommended that production systems call uxTaskGetSystemState()
* directly to get access to raw stats data, rather than indirectly
* through a call to vTaskGetRunTimeStats().
*/
@@ -2869,7 +2869,7 @@ tskTCB *pxNewTCB;
if( pxTaskStatusArray != NULL )
{
/* Generate the (binary) data. */
- uxArraySize = xTaskGetSystemState( pxTaskStatusArray, uxArraySize, &ulTotalTime );
+ uxArraySize = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, &ulTotalTime );
/* For percentage calculations. */
ulTotalTime /= 100UL;