/* Only the current stack state is to be checked. */\r
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \\r
{ \\r
- extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName ); \\r
+ extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \\r
\\r
/* Is the currently saved stack pointer within the stack limit? */ \\r
if( pxCurrentTCB->pxTopOfStack <= pxCurrentTCB->pxStack ) \\r
/* Only the current stack state is to be checked. */\r
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \\r
{ \\r
- extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName ); \\r
+ extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \\r
\\r
/* Is the currently saved stack pointer within the stack limit? */ \\r
if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack ) \\r
\r
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \\r
{ \\r
- extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName ); \\r
- static const unsigned portCHAR ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \\r
+ extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \\r
+ static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \\r
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \\r
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \\r
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \\r
\r
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \\r
{ \\r
- extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName ); \\r
- portCHAR *pcEndOfStack = ( portCHAR * ) pxCurrentTCB->pxEndOfStack; \\r
- static const unsigned portCHAR ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \\r
+ extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \\r
+ char *pcEndOfStack = ( char * ) pxCurrentTCB->pxEndOfStack; \\r
+ static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \\r
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \\r
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \\r
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \\r
xListItem xEventListItem; /*< List item used to place the CRCB in event lists. */\r
unsigned portBASE_TYPE uxPriority; /*< The priority of the co-routine in relation to other co-routines. */\r
unsigned portBASE_TYPE uxIndex; /*< Used to distinguish between co-routines when multiple co-routines use the same co-routine function. */\r
- unsigned portSHORT uxState; /*< Used internally by the co-routine implementation. */\r
+ unsigned short uxState; /*< Used internally by the co-routine implementation. */\r
} corCRCB; /* Co-routine control block. Note must be identical in size down to uxPriority with tskTCB. */\r
\r
/**\r
void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
// Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
- static portLONG ulAVariable;\r
+ static long ulAVariable;\r
\r
// Must start every co-routine with a call to crSTART();\r
crSTART( xHandle );\r
void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
// Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
- static portLONG ulAVariable;\r
+ static long ulAVariable;\r
\r
// Must start every co-routine with a call to crSTART();\r
crSTART( xHandle );\r
// A co-routine that blocks on a queue waiting for characters to be received.\r
static void vReceivingCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
- portCHAR cRxedChar;\r
+ char cRxedChar;\r
portBASE_TYPE xResult;\r
\r
// All co-routines must start with a call to crSTART().\r
// a co-routine.\r
void vUART_ISR( void )\r
{\r
- portCHAR cRxedChar;\r
+ char cRxedChar;\r
portBASE_TYPE xCRWokenByPost = pdFALSE;\r
\r
// We loop around reading characters until there are none left in the UART.\r
{\r
// cChar holds its value while this co-routine is blocked and must therefore\r
// be declared static.\r
- static portCHAR cCharToTx = 'a';\r
+ static char cCharToTx = 'a';\r
portBASE_TYPE xResult;\r
\r
// All co-routines must start with a call to crSTART().\r
// An ISR that uses a queue to receive characters to send on a UART.\r
void vUART_ISR( void )\r
{\r
- portCHAR cCharToTx;\r
+ char cCharToTx;\r
portBASE_TYPE xCRWokenByPost = pdFALSE;\r
\r
while( UART_TX_REG_EMPTY() )\r
<pre>\r
struct AMessage\r
{\r
- portCHAR ucMessageID;\r
- portCHAR ucData[ 20 ];\r
+ char ucMessageID;\r
+ char ucData[ 20 ];\r
};\r
\r
void vATask( void *pvParameters )\r
xQueueHandle xQueue1, xQueue2;\r
\r
// Create a queue capable of containing 10 unsigned long values.\r
- xQueue1 = xQueueCreate( 10, sizeof( unsigned portLONG ) );\r
+ xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );\r
if( xQueue1 == 0 )\r
{\r
// Queue was not created and must not be used.\r
<pre>\r
struct AMessage\r
{\r
- portCHAR ucMessageID;\r
- portCHAR ucData[ 20 ];\r
+ char ucMessageID;\r
+ char ucData[ 20 ];\r
} xMessage;\r
\r
- unsigned portLONG ulVar = 10UL;\r
+ unsigned long ulVar = 10UL;\r
\r
void vATask( void *pvParameters )\r
{\r
struct AMessage *pxMessage;\r
\r
// Create a queue capable of containing 10 unsigned long values.\r
- xQueue1 = xQueueCreate( 10, sizeof( unsigned portLONG ) );\r
+ xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );\r
\r
// Create a queue capable of containing 10 pointers to AMessage structures.\r
// These should be passed by pointer as they contain a lot of data.\r
<pre>\r
struct AMessage\r
{\r
- portCHAR ucMessageID;\r
- portCHAR ucData[ 20 ];\r
+ char ucMessageID;\r
+ char ucData[ 20 ];\r
} xMessage;\r
\r
- unsigned portLONG ulVar = 10UL;\r
+ unsigned long ulVar = 10UL;\r
\r
void vATask( void *pvParameters )\r
{\r
struct AMessage *pxMessage;\r
\r
// Create a queue capable of containing 10 unsigned long values.\r
- xQueue1 = xQueueCreate( 10, sizeof( unsigned portLONG ) );\r
+ xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );\r
\r
// Create a queue capable of containing 10 pointers to AMessage structures.\r
// These should be passed by pointer as they contain a lot of data.\r
<pre>\r
struct AMessage\r
{\r
- portCHAR ucMessageID;\r
- portCHAR ucData[ 20 ];\r
+ char ucMessageID;\r
+ char ucData[ 20 ];\r
} xMessage;\r
\r
- unsigned portLONG ulVar = 10UL;\r
+ unsigned long ulVar = 10UL;\r
\r
void vATask( void *pvParameters )\r
{\r
struct AMessage *pxMessage;\r
\r
// Create a queue capable of containing 10 unsigned long values.\r
- xQueue1 = xQueueCreate( 10, sizeof( unsigned portLONG ) );\r
+ xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );\r
\r
// Create a queue capable of containing 10 pointers to AMessage structures.\r
// These should be passed by pointer as they contain a lot of data.\r
<pre>\r
struct AMessage\r
{\r
- portCHAR ucMessageID;\r
- portCHAR ucData[ 20 ];\r
+ char ucMessageID;\r
+ char ucData[ 20 ];\r
} xMessage;\r
\r
- unsigned portLONG ulVar = 10UL;\r
+ unsigned long ulVar = 10UL;\r
\r
void vATask( void *pvParameters )\r
{\r
struct AMessage *pxMessage;\r
\r
// Create a queue capable of containing 10 unsigned long values.\r
- xQueue1 = xQueueCreate( 10, sizeof( unsigned portLONG ) );\r
+ xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );\r
\r
// Create a queue capable of containing 10 pointers to AMessage structures.\r
// These should be passed by pointer as they contain a lot of data.\r
<pre>\r
struct AMessage\r
{\r
- portCHAR ucMessageID;\r
- portCHAR ucData[ 20 ];\r
+ char ucMessageID;\r
+ char ucData[ 20 ];\r
} xMessage;\r
\r
xQueueHandle xQueue;\r
<pre>\r
struct AMessage\r
{\r
- portCHAR ucMessageID;\r
- portCHAR ucData[ 20 ];\r
+ char ucMessageID;\r
+ char ucData[ 20 ];\r
} xMessage;\r
\r
xQueueHandle xQueue;\r
<pre>\r
struct AMessage\r
{\r
- portCHAR ucMessageID;\r
- portCHAR ucData[ 20 ];\r
+ char ucMessageID;\r
+ char ucData[ 20 ];\r
} xMessage;\r
\r
xQueueHandle xQueue;\r
<pre>\r
void vBufferISR( void )\r
{\r
- portCHAR cIn;\r
+ char cIn;\r
portBASE_TYPE xHigherPrioritTaskWoken;\r
\r
// We have not woken a task at the start of the ISR.\r
<pre>\r
void vBufferISR( void )\r
{\r
- portCHAR cIn;\r
+ char cIn;\r
portBASE_TYPE xHigherPriorityTaskWoken;\r
\r
// We have not woken a task at the start of the ISR.\r
<pre>\r
void vBufferISR( void )\r
{\r
- portCHAR cIn;\r
+ char cIn;\r
portBASE_TYPE xHigherPriorityTaskWoken;\r
\r
// We have not woken a task at the start of the ISR.\r
<pre>\r
void vBufferISR( void )\r
{\r
- portCHAR cIn;\r
+ char cIn;\r
portBASE_TYPE xHigherPriorityTaskWokenByPost;\r
\r
// We have not woken a task at the start of the ISR.\r
// Function to create a queue and post some values.\r
void vAFunction( void *pvParameters )\r
{\r
- portCHAR cValueToPost;\r
+ char cValueToPost;\r
const portTickType xBlockTime = ( portTickType )0xff;\r
\r
// Create a queue capable of containing 10 characters.\r
- xQueue = xQueueCreate( 10, sizeof( portCHAR ) );\r
+ xQueue = xQueueCreate( 10, sizeof( char ) );\r
if( xQueue == 0 )\r
{\r
// Failed to create the queue.\r
void vISR_Routine( void )\r
{\r
portBASE_TYPE xTaskWokenByReceive = pdFALSE;\r
- portCHAR cRxedChar;\r
+ char cRxedChar;\r
\r
while( xQueueReceiveFromISR( xQueue, ( void * ) &cRxedChar, &xTaskWokenByReceive) )\r
{\r
// task will be woken.\r
}\r
\r
- if( cTaskWokenByPost != ( portCHAR ) pdFALSE;\r
+ if( cTaskWokenByPost != ( char ) pdFALSE;\r
{\r
taskYIELD ();\r
}\r
* name that the kernel aware debugger will display.\r
*/\r
#if configQUEUE_REGISTRY_SIZE > 0\r
- void vQueueAddToRegistry( xQueueHandle xQueue, signed portCHAR *pcName );\r
+ void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName );\r
#endif\r
\r
\r
\r
typedef xQueueHandle xSemaphoreHandle;\r
\r
-#define semBINARY_SEMAPHORE_QUEUE_LENGTH ( ( unsigned portCHAR ) 1 )\r
-#define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( unsigned portCHAR ) 0 )\r
+#define semBINARY_SEMAPHORE_QUEUE_LENGTH ( ( unsigned char ) 1 )\r
+#define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( unsigned char ) 0 )\r
#define semGIVE_BLOCK_TIME ( ( portTickType ) 0 )\r
\r
\r
// Timer ISR\r
void vTimerISR( void * pvParameters )\r
{\r
- static unsigned portCHAR ucLocalTickCount = 0;\r
+ static unsigned char ucLocalTickCount = 0;\r
static portBASE_TYPE xHigherPriorityTaskWoken;\r
\r
// A timer tick has occurred.\r
typedef struct xMEMORY_REGION\r
{\r
void *pvBaseAddress;\r
- unsigned portLONG ulLengthInBytes;\r
- unsigned portLONG ulParameters;\r
+ unsigned long ulLengthInBytes;\r
+ unsigned long ulParameters;\r
} xMemoryRegion;\r
\r
/*\r
typedef struct xTASK_PARAMTERS\r
{\r
pdTASK_CODE pvTaskCode;\r
- const signed portCHAR * const pcName;\r
- unsigned portSHORT usStackDepth;\r
+ const signed char * const pcName;\r
+ unsigned short usStackDepth;\r
void *pvParameters;\r
unsigned portBASE_TYPE uxPriority;\r
portSTACK_TYPE *puxStackBuffer;\r
*<pre>\r
portBASE_TYPE xTaskCreate(\r
pdTASK_CODE pvTaskCode,\r
- const portCHAR * const pcName,\r
- unsigned portSHORT usStackDepth,\r
+ const char * const pcName,\r
+ unsigned short usStackDepth,\r
void *pvParameters,\r
unsigned portBASE_TYPE uxPriority,\r
xTaskHandle *pvCreatedTask\r
\r
/**\r
* task. h\r
- * <pre>portCHAR xTaskResumeAll( void );</pre>\r
+ * <pre>char xTaskResumeAll( void );</pre>\r
*\r
* Resumes real time kernel activity following a call to vTaskSuspendAll ().\r
* After a call to vTaskSuspendAll () the kernel will take control of which\r
\r
/**\r
* task. h\r
- * <PRE>unsigned portSHORT uxTaskGetNumberOfTasks( void );</PRE>\r
+ * <PRE>unsigned short uxTaskGetNumberOfTasks( void );</PRE>\r
*\r
* @return The number of tasks that the real time kernel is currently managing.\r
* This includes all ready, blocked and suspended tasks. A task that\r
\r
/**\r
* task. h\r
- * <PRE>void vTaskList( portCHAR *pcWriteBuffer );</PRE>\r
+ * <PRE>void vTaskList( char *pcWriteBuffer );</PRE>\r
*\r
* configUSE_TRACE_FACILITY must be defined as 1 for this function to be\r
* available. See the configuration section for more information.\r
* \page vTaskList vTaskList\r
* \ingroup TaskUtils\r
*/\r
-void vTaskList( signed portCHAR *pcWriteBuffer ) PRIVILEGED_FUNCTION;\r
+void vTaskList( signed char *pcWriteBuffer ) PRIVILEGED_FUNCTION;\r
\r
/**\r
* task. h\r
- * <PRE>void vTaskGetRunTimeStats( portCHAR *pcWriteBuffer );</PRE>\r
+ * <PRE>void vTaskGetRunTimeStats( char *pcWriteBuffer );</PRE>\r
*\r
* configGENERATE_RUN_TIME_STATS must be defined as 1 for this function\r
* to be available. The application must also then provide definitions\r
* \page vTaskGetRunTimeStats vTaskGetRunTimeStats\r
* \ingroup TaskUtils\r
*/\r
-void vTaskGetRunTimeStats( signed portCHAR *pcWriteBuffer ) PRIVILEGED_FUNCTION;\r
+void vTaskGetRunTimeStats( signed char *pcWriteBuffer ) PRIVILEGED_FUNCTION;\r
\r
/**\r
* task. h\r
- * <PRE>void vTaskStartTrace( portCHAR * pcBuffer, unsigned portBASE_TYPE uxBufferSize );</PRE>\r
+ * <PRE>void vTaskStartTrace( char * pcBuffer, unsigned portBASE_TYPE uxBufferSize );</PRE>\r
*\r
* Starts a real time kernel activity trace. The trace logs the identity of\r
* which task is running when.\r
* \page vTaskStartTrace vTaskStartTrace\r
* \ingroup TaskUtils\r
*/\r
-void vTaskStartTrace( signed portCHAR * pcBuffer, unsigned portLONG ulBufferSize ) PRIVILEGED_FUNCTION;\r
+void vTaskStartTrace( signed char * pcBuffer, unsigned long ulBufferSize ) PRIVILEGED_FUNCTION;\r
\r
/**\r
* task. h\r
- * <PRE>unsigned portLONG ulTaskEndTrace( void );</PRE>\r
+ * <PRE>unsigned long ulTaskEndTrace( void );</PRE>\r
*\r
* Stops a kernel activity trace. See vTaskStartTrace ().\r
*\r
* \page usTaskEndTrace usTaskEndTrace\r
* \ingroup TaskUtils\r
*/\r
-unsigned portLONG ulTaskEndTrace( void ) PRIVILEGED_FUNCTION;\r
+unsigned long ulTaskEndTrace( void ) PRIVILEGED_FUNCTION;\r
\r
/**\r
* task.h\r
* Generic version of the task creation function which is in turn called by the\r
* xTaskCreate() and xTaskCreateProtected() macros.\r
*/\r
-signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pvTaskCode, const signed portCHAR * const pcName, unsigned portSHORT usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions ) PRIVILEGED_FUNCTION;\r
+signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pvTaskCode, const signed char * const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions ) PRIVILEGED_FUNCTION;\r
\r
#ifdef __cplusplus\r
}\r
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE\r
\r
/* Constants required to access and manipulate the NVIC. */\r
-#define portNVIC_SYSTICK_CTRL ( ( volatile unsigned portLONG * ) 0xe000e010 )\r
-#define portNVIC_SYSTICK_LOAD ( ( volatile unsigned portLONG * ) 0xe000e014 )\r
-#define portNVIC_SYSPRI2 ( ( volatile unsigned portLONG * ) 0xe000ed20 )\r
-#define portNVIC_SYSPRI1 ( ( volatile unsigned portLONG * ) 0xe000ed1c )\r
-#define portNVIC_SYS_CTRL_STATE ( ( volatile unsigned portLONG * ) 0xe000ed24 )\r
+#define portNVIC_SYSTICK_CTRL ( ( volatile unsigned long * ) 0xe000e010 )\r
+#define portNVIC_SYSTICK_LOAD ( ( volatile unsigned long * ) 0xe000e014 )\r
+#define portNVIC_SYSPRI2 ( ( volatile unsigned long * ) 0xe000ed20 )\r
+#define portNVIC_SYSPRI1 ( ( volatile unsigned long * ) 0xe000ed1c )\r
+#define portNVIC_SYS_CTRL_STATE ( ( volatile unsigned long * ) 0xe000ed24 )\r
#define portNVIC_MEM_FAULT_ENABLE ( 1UL << 16UL )\r
\r
/* Constants required to access and manipulate the MPU. */\r
-#define portMPU_TYPE ( ( volatile unsigned portLONG * ) 0xe000ed90 )\r
-#define portMPU_REGION_BASE_ADDRESS ( ( volatile unsigned portLONG * ) 0xe000ed9C )\r
-#define portMPU_REGION_ATTRIBUTE ( ( volatile unsigned portLONG * ) 0xe000edA0 )\r
-#define portMPU_CTRL ( ( volatile unsigned portLONG * ) 0xe000ed94 )\r
+#define portMPU_TYPE ( ( volatile unsigned long * ) 0xe000ed90 )\r
+#define portMPU_REGION_BASE_ADDRESS ( ( volatile unsigned long * ) 0xe000ed9C )\r
+#define portMPU_REGION_ATTRIBUTE ( ( volatile unsigned long * ) 0xe000edA0 )\r
+#define portMPU_CTRL ( ( volatile unsigned long * ) 0xe000ed94 )\r
#define portEXPECTED_MPU_TYPE_VALUE ( 8UL << 8UL ) /* 8 regions, unified. */\r
#define portMPU_ENABLE ( 0x01UL )\r
#define portMPU_BACKGROUND_ENABLE ( 1UL << 2UL )\r
#define portNVIC_SYSTICK_CLK ( 0x00000004UL )\r
#define portNVIC_SYSTICK_INT ( 0x00000002UL )\r
#define portNVIC_SYSTICK_ENABLE ( 0x00000001UL )\r
-#define portNVIC_PENDSV_PRI ( ( ( unsigned portLONG ) configKERNEL_INTERRUPT_PRIORITY ) << 16UL )\r
-#define portNVIC_SYSTICK_PRI ( ( ( unsigned portLONG ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )\r
-#define portNVIC_SVC_PRI ( ( ( unsigned portLONG ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )\r
+#define portNVIC_PENDSV_PRI ( ( ( unsigned long ) configKERNEL_INTERRUPT_PRIORITY ) << 16UL )\r
+#define portNVIC_SYSTICK_PRI ( ( ( unsigned long ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )\r
+#define portNVIC_SVC_PRI ( ( ( unsigned long ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )\r
#define portNVIC_TEMP_SVC_PRI ( 0x01UL << 24UL )\r
\r
/* Constants required to set up the initial stack. */\r
/*\r
* Setup the timer to generate the tick interrupts.\r
*/\r
-static void prvSetupTimerInterrupt( void );\r
+static void prvSetupTimerInterrupt( void ) PRIVILEGED_FUNCTION;\r
\r
/*\r
* Configure a number of standard MPU regions that are used by all tasks.\r
*/\r
-static void prvSetupMPU( void );\r
+static void prvSetupMPU( void ) PRIVILEGED_FUNCTION;\r
\r
/* \r
* Return the smallest MPU region size that a given number of bytes will fit\r
* into. The region size is returned as the value that should be programmed\r
* into the region attribute register for that region.\r
*/\r
-static unsigned long prvGetMPURegionSizeSetting( unsigned long ulActualSizeInBytes );\r
+static unsigned long prvGetMPURegionSizeSetting( unsigned long ulActualSizeInBytes ) PRIVILEGED_FUNCTION;\r
\r
/* \r
* Checks to see if being called from the context of an unprivileged task, and\r
* if so raises the privilege level and returns false - otherwise does nothing\r
* other than return true.\r
*/\r
-portBASE_TYPE prvRaisePrivilege( void ) __attribute__(( naked ));\r
+static portBASE_TYPE prvRaisePrivilege( void ) __attribute__(( naked ));\r
\r
/*\r
* Standard FreeRTOS exception handlers.\r
*/\r
-void xPortPendSVHandler( void ) __attribute__ (( naked ));\r
-void xPortSysTickHandler( void ) __attribute__ ((optimize("3")));\r
-void vPortSVCHandler( void ) __attribute__ (( naked ));\r
+void xPortPendSVHandler( void ) __attribute__ (( naked )) PRIVILEGED_FUNCTION;\r
+void xPortSysTickHandler( void ) __attribute__ ((optimize("3"))) PRIVILEGED_FUNCTION;\r
+void vPortSVCHandler( void ) __attribute__ (( naked )) PRIVILEGED_FUNCTION;\r
\r
/*\r
* Starts the scheduler by restoring the context of the first task to run.\r
*/\r
-static void prvRestoreContextOfFirstTask( void ) __attribute__(( naked ));\r
+static void prvRestoreContextOfFirstTask( void ) __attribute__(( naked )) PRIVILEGED_FUNCTION;\r
\r
/*\r
* C portion of the SVC handler. The SVC handler is split between an asm entry\r
* and a C wrapper for simplicity of coding and maintenance.\r
*/\r
-static void prvSVCHandler( unsigned long *pulRegisters ) __attribute__ ((optimize("3")));\r
+static void prvSVCHandler( unsigned long *pulRegisters ) __attribute__ ((optimize("3"))) PRIVILEGED_FUNCTION;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
void xPortSysTickHandler( void )\r
{\r
-unsigned portLONG ulDummy;\r
+unsigned long ulDummy;\r
\r
/* If using preemption, also force a context switch. */\r
#if configUSE_PREEMPTION == 1\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE prvRaisePrivilege( void )\r
+static portBASE_TYPE prvRaisePrivilege( void )\r
{\r
__asm volatile\r
( \r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned portSHORT usStackDepth )\r
+void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth )\r
{\r
extern unsigned long __SRAM_segment_start__[];\r
extern unsigned long __SRAM_segment_end__[];\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE MPU_xTaskGenericCreate( pdTASK_CODE pvTaskCode, const signed portCHAR * const pcName, unsigned portSHORT usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions )\r
+signed portBASE_TYPE MPU_xTaskGenericCreate( pdTASK_CODE pvTaskCode, const signed char * const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions )\r
{\r
signed portBASE_TYPE xReturn;\r
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void MPU_vTaskList( signed portCHAR *pcWriteBuffer )\r
+void MPU_vTaskList( signed char *pcWriteBuffer )\r
{\r
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
\r
/*-----------------------------------------------------------*/\r
\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
- void MPU_vTaskGetRunTimeStats( signed portCHAR *pcWriteBuffer )\r
+ void MPU_vTaskGetRunTimeStats( signed char *pcWriteBuffer )\r
{\r
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
\r
/*-----------------------------------------------------------*/\r
\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
- void MPU_vTaskStartTrace( signed portCHAR * pcBuffer, unsigned portLONG ulBufferSize )\r
+ void MPU_vTaskStartTrace( signed char * pcBuffer, unsigned long ulBufferSize )\r
{\r
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
\r
/*-----------------------------------------------------------*/\r
\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
- unsigned portLONG MPU_ulTaskEndTrace( void )\r
+ unsigned long MPU_ulTaskEndTrace( void )\r
{\r
- unsigned portLONG ulReturn;\r
+ unsigned long ulReturn;\r
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
\r
ulReturn = ulTaskEndTrace();\r
/*-----------------------------------------------------------*/\r
\r
#if configQUEUE_REGISTRY_SIZE > 0\r
- void MPU_vQueueAddToRegistry( xQueueHandle xQueue, signed portCHAR *pcName )\r
+ void MPU_vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName )\r
{\r
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
\r
*/\r
typedef struct QueueDefinition\r
{\r
- signed portCHAR *pcHead; /*< Points to the beginning of the queue storage area. */\r
- signed portCHAR *pcTail; /*< Points to the byte at the end of the queue storage area. Once more byte is allocated than necessary to store the queue items, this is used as a marker. */\r
+ signed char *pcHead; /*< Points to the beginning of the queue storage area. */\r
+ signed char *pcTail; /*< Points to the byte at the end of the queue storage area. Once more byte is allocated than necessary to store the queue items, this is used as a marker. */\r
\r
- signed portCHAR *pcWriteTo; /*< Points to the free next place in the storage area. */\r
- signed portCHAR *pcReadFrom; /*< Points to the last place that a queued item was read from. */\r
+ signed char *pcWriteTo; /*< Points to the free next place in the storage area. */\r
+ signed char *pcReadFrom; /*< Points to the last place that a queued item was read from. */\r
\r
xList xTasksWaitingToSend; /*< List of tasks that are blocked waiting to post onto this queue. Stored in priority order. */\r
xList xTasksWaitingToReceive; /*< List of tasks that are blocked waiting to read from this queue. Stored in priority order. */\r
more user friendly. */\r
typedef struct QUEUE_REGISTRY_ITEM\r
{\r
- signed portCHAR *pcQueueName;\r
+ signed char *pcQueueName;\r
xQueueHandle xHandle;\r
} xQueueRegistryItem;\r
\r
/* Removes a queue from the registry by simply setting the pcQueueName\r
member to NULL. */\r
static void vQueueUnregisterQueue( xQueueHandle xQueue ) PRIVILEGED_FUNCTION;\r
- void vQueueAddToRegistry( xQueueHandle xQueue, signed portCHAR *pcQueueName ) PRIVILEGED_FUNCTION;\r
+ void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcQueueName ) PRIVILEGED_FUNCTION;\r
#endif\r
\r
/*\r
longer than asked for to make wrap checking easier/faster. */\r
xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ) + ( size_t ) 1;\r
\r
- pxNewQueue->pcHead = ( signed portCHAR * ) pvPortMalloc( xQueueSizeInBytes );\r
+ pxNewQueue->pcHead = ( signed char * ) pvPortMalloc( xQueueSizeInBytes );\r
if( pxNewQueue->pcHead != NULL )\r
{\r
/* Initialise the queue members as described above where the\r
{\r
signed portBASE_TYPE xEntryTimeSet = pdFALSE;\r
xTimeOutType xTimeOut;\r
- signed portCHAR *pcOriginalReadPosition;\r
+ signed char *pcOriginalReadPosition;\r
\r
for( ;; )\r
{\r
{\r
signed portBASE_TYPE xEntryTimeSet = pdFALSE;\r
xTimeOutType xTimeOut;\r
-signed portCHAR *pcOriginalReadPosition;\r
+signed char *pcOriginalReadPosition;\r
\r
/* This function relaxes the coding standard somewhat to allow return\r
statements within the function itself. This is done in the interest\r
\r
#if configQUEUE_REGISTRY_SIZE > 0\r
\r
- void vQueueAddToRegistry( xQueueHandle xQueue, signed portCHAR *pcQueueName )\r
+ void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcQueueName )\r
{\r
unsigned portBASE_TYPE ux;\r
\r
xListItem xEventListItem; /*< List item used to place the TCB in event lists. */\r
unsigned portBASE_TYPE uxPriority; /*< The priority of the task where 0 is the lowest priority. */\r
portSTACK_TYPE *pxStack; /*< Points to the start of the stack. */\r
- signed portCHAR pcTaskName[ configMAX_TASK_NAME_LEN ];/*< Descriptive name given to the task when created. Facilitates debugging only. */\r
+ signed char pcTaskName[ configMAX_TASK_NAME_LEN ];/*< Descriptive name given to the task when created. Facilitates debugging only. */\r
\r
#if ( portSTACK_GROWTH > 0 )\r
portSTACK_TYPE *pxEndOfStack; /*< Used for stack overflow checking on architectures where the stack grows up from low memory. */\r
#endif\r
\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
- unsigned portLONG ulRunTimeCounter; /*< Used for calculating how much CPU time each task is utilising. */\r
+ unsigned long ulRunTimeCounter; /*< Used for calculating how much CPU time each task is utilising. */\r
#endif\r
\r
} tskTCB;\r
\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
\r
- PRIVILEGED_DATA static portCHAR pcStatsString[ 50 ] ;\r
- PRIVILEGED_DATA static unsigned portLONG ulTaskSwitchedInTime = 0UL; /*< Holds the value of a timer/counter the last time a task was switched in. */\r
- static void prvGenerateRunTimeStatsForTasksInList( const signed portCHAR *pcWriteBuffer, xList *pxList, unsigned portLONG ulTotalRunTime ) PRIVILEGED_FUNCTION;\r
+ PRIVILEGED_DATA static char pcStatsString[ 50 ] ;\r
+ PRIVILEGED_DATA static unsigned long ulTaskSwitchedInTime = 0UL; /*< Holds the value of a timer/counter the last time a task was switched in. */\r
+ static void prvGenerateRunTimeStatsForTasksInList( const signed char *pcWriteBuffer, xList *pxList, unsigned long ulTotalRunTime ) PRIVILEGED_FUNCTION;\r
\r
#endif\r
\r
/*\r
* Macros used by vListTask to indicate which state a task is in.\r
*/\r
-#define tskBLOCKED_CHAR ( ( signed portCHAR ) 'B' )\r
-#define tskREADY_CHAR ( ( signed portCHAR ) 'R' )\r
-#define tskDELETED_CHAR ( ( signed portCHAR ) 'D' )\r
-#define tskSUSPENDED_CHAR ( ( signed portCHAR ) 'S' )\r
+#define tskBLOCKED_CHAR ( ( signed char ) 'B' )\r
+#define tskREADY_CHAR ( ( signed char ) 'R' )\r
+#define tskDELETED_CHAR ( ( signed char ) 'D' )\r
+#define tskSUSPENDED_CHAR ( ( signed char ) 'S' )\r
\r
/*\r
* Macros and private variables used by the trace facility.\r
*/\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
\r
- #define tskSIZE_OF_EACH_TRACE_LINE ( ( unsigned portLONG ) ( sizeof( unsigned portLONG ) + sizeof( unsigned portLONG ) ) )\r
- PRIVILEGED_DATA static volatile signed portCHAR * volatile pcTraceBuffer;\r
- PRIVILEGED_DATA static signed portCHAR *pcTraceBufferStart;\r
- PRIVILEGED_DATA static signed portCHAR *pcTraceBufferEnd;\r
+ #define tskSIZE_OF_EACH_TRACE_LINE ( ( unsigned long ) ( sizeof( unsigned long ) + sizeof( unsigned long ) ) )\r
+ PRIVILEGED_DATA static volatile signed char * volatile pcTraceBuffer;\r
+ PRIVILEGED_DATA static signed char *pcTraceBufferStart;\r
+ PRIVILEGED_DATA static signed char *pcTraceBufferEnd;\r
PRIVILEGED_DATA static signed portBASE_TYPE xTracing = pdFALSE;\r
static unsigned portBASE_TYPE uxPreviousTask = 255;\r
- PRIVILEGED_DATA static portCHAR pcStatusString[ 50 ];\r
+ PRIVILEGED_DATA static char pcStatusString[ 50 ];\r
\r
#endif\r
\r
if( ( pcTraceBuffer + tskSIZE_OF_EACH_TRACE_LINE ) < pcTraceBufferEnd ) \\r
{ \\r
uxPreviousTask = pxCurrentTCB->uxTCBNumber; \\r
- *( unsigned portLONG * ) pcTraceBuffer = ( unsigned portLONG ) xTickCount; \\r
- pcTraceBuffer += sizeof( unsigned portLONG ); \\r
- *( unsigned portLONG * ) pcTraceBuffer = ( unsigned portLONG ) uxPreviousTask; \\r
- pcTraceBuffer += sizeof( unsigned portLONG ); \\r
+ *( unsigned long * ) pcTraceBuffer = ( unsigned long ) xTickCount; \\r
+ pcTraceBuffer += sizeof( unsigned long ); \\r
+ *( unsigned long * ) pcTraceBuffer = ( unsigned long ) uxPreviousTask; \\r
+ pcTraceBuffer += sizeof( unsigned long ); \\r
} \\r
else \\r
{ \\r
* Utility to ready a TCB for a given task. Mainly just copies the parameters\r
* into the TCB structure.\r
*/\r
-static void prvInitialiseTCBVariables( tskTCB *pxTCB, const signed portCHAR * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, unsigned portSHORT usStackDepth ) PRIVILEGED_FUNCTION;\r
+static void prvInitialiseTCBVariables( tskTCB *pxTCB, const signed char * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, unsigned short usStackDepth ) PRIVILEGED_FUNCTION;\r
\r
/*\r
* Utility to ready all the lists used by the scheduler. This is called\r
* Allocates memory from the heap for a TCB and associated stack. Checks the\r
* allocation was successful.\r
*/\r
-static tskTCB *prvAllocateTCBAndStack( unsigned portSHORT usStackDepth, portSTACK_TYPE *puxStackBuffer ) PRIVILEGED_FUNCTION;\r
+static tskTCB *prvAllocateTCBAndStack( unsigned short usStackDepth, portSTACK_TYPE *puxStackBuffer ) PRIVILEGED_FUNCTION;\r
\r
/*\r
* Called from vTaskList. vListTasks details all the tasks currently under\r
*/\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
\r
- static void prvListTaskWithinSingleList( const signed portCHAR *pcWriteBuffer, xList *pxList, signed portCHAR cStatus ) PRIVILEGED_FUNCTION;\r
+ static void prvListTaskWithinSingleList( const signed char *pcWriteBuffer, xList *pxList, signed char cStatus ) PRIVILEGED_FUNCTION;\r
\r
#endif\r
\r
*/\r
#if ( ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) )\r
\r
- static unsigned portSHORT usTaskCheckFreeStackSpace( const unsigned portCHAR * pucStackByte ) PRIVILEGED_FUNCTION;\r
+ static unsigned short usTaskCheckFreeStackSpace( const unsigned char * pucStackByte ) PRIVILEGED_FUNCTION;\r
\r
#endif\r
\r
* TASK CREATION API documented in task.h\r
*----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const signed portCHAR * const pcName, unsigned portSHORT usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions )\r
+signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const signed char * const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions )\r
{\r
signed portBASE_TYPE xReturn;\r
tskTCB * pxNewTCB;\r
#if( portSTACK_GROWTH < 0 )\r
{\r
pxTopOfStack = pxNewTCB->pxStack + ( usStackDepth - 1 );\r
- pxTopOfStack = ( portSTACK_TYPE * ) ( ( ( unsigned portLONG ) pxTopOfStack ) & ( ( unsigned portLONG ) ~portBYTE_ALIGNMENT_MASK ) );\r
+ pxTopOfStack = ( portSTACK_TYPE * ) ( ( ( unsigned long ) pxTopOfStack ) & ( ( unsigned long ) ~portBYTE_ALIGNMENT_MASK ) );\r
}\r
#else\r
{\r
portBASE_TYPE xReturn;\r
\r
/* Add the idle task at the lowest priority. */\r
- xReturn = xTaskCreate( prvIdleTask, ( signed portCHAR * ) "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), ( xTaskHandle * ) NULL );\r
+ xReturn = xTaskCreate( prvIdleTask, ( signed char * ) "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), ( xTaskHandle * ) NULL );\r
\r
if( xReturn == pdPASS )\r
{\r
\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
\r
- void vTaskList( signed portCHAR *pcWriteBuffer )\r
+ void vTaskList( signed char *pcWriteBuffer )\r
{\r
unsigned portBASE_TYPE uxQueue;\r
\r
/* Run through all the lists that could potentially contain a TCB and\r
report the task name, state and stack high water mark. */\r
\r
- pcWriteBuffer[ 0 ] = ( signed portCHAR ) 0x00;\r
- strcat( ( portCHAR * ) pcWriteBuffer, ( const portCHAR * ) "\r\n" );\r
+ pcWriteBuffer[ 0 ] = ( signed char ) 0x00;\r
+ strcat( ( char * ) pcWriteBuffer, ( const char * ) "\r\n" );\r
\r
uxQueue = uxTopUsedPriority + 1;\r
\r
{\r
prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) &( pxReadyTasksLists[ uxQueue ] ), tskREADY_CHAR );\r
}\r
- }while( uxQueue > ( unsigned portSHORT ) tskIDLE_PRIORITY );\r
+ }while( uxQueue > ( unsigned short ) tskIDLE_PRIORITY );\r
\r
if( !listLIST_IS_EMPTY( pxDelayedTaskList ) )\r
{\r
\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
\r
- void vTaskGetRunTimeStats( signed portCHAR *pcWriteBuffer )\r
+ void vTaskGetRunTimeStats( signed char *pcWriteBuffer )\r
{\r
unsigned portBASE_TYPE uxQueue;\r
- unsigned portLONG ulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();\r
+ unsigned long ulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();\r
\r
/* This is a VERY costly function that should be used for debug only.\r
It leaves interrupts disabled for a LONG time. */\r
generating a table of run timer percentages in the provided\r
buffer. */\r
\r
- pcWriteBuffer[ 0 ] = ( signed portCHAR ) 0x00;\r
- strcat( ( portCHAR * ) pcWriteBuffer, ( const portCHAR * ) "\r\n" );\r
+ pcWriteBuffer[ 0 ] = ( signed char ) 0x00;\r
+ strcat( ( char * ) pcWriteBuffer, ( const char * ) "\r\n" );\r
\r
uxQueue = uxTopUsedPriority + 1;\r
\r
{\r
prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) &( pxReadyTasksLists[ uxQueue ] ), ulTotalRunTime );\r
}\r
- }while( uxQueue > ( unsigned portSHORT ) tskIDLE_PRIORITY );\r
+ }while( uxQueue > ( unsigned short ) tskIDLE_PRIORITY );\r
\r
if( !listLIST_IS_EMPTY( pxDelayedTaskList ) )\r
{\r
\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
\r
- void vTaskStartTrace( signed portCHAR * pcBuffer, unsigned portLONG ulBufferSize )\r
+ void vTaskStartTrace( signed char * pcBuffer, unsigned long ulBufferSize )\r
{\r
portENTER_CRITICAL();\r
{\r
- pcTraceBuffer = ( signed portCHAR * )pcBuffer;\r
+ pcTraceBuffer = ( signed char * )pcBuffer;\r
pcTraceBufferStart = pcBuffer;\r
pcTraceBufferEnd = pcBuffer + ( ulBufferSize - tskSIZE_OF_EACH_TRACE_LINE );\r
xTracing = pdTRUE;\r
\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
\r
- unsigned portLONG ulTaskEndTrace( void )\r
+ unsigned long ulTaskEndTrace( void )\r
{\r
- unsigned portLONG ulBufferLength;\r
+ unsigned long ulBufferLength;\r
\r
portENTER_CRITICAL();\r
xTracing = pdFALSE;\r
portEXIT_CRITICAL();\r
\r
- ulBufferLength = ( unsigned portLONG ) ( pcTraceBuffer - pcTraceBufferStart );\r
+ ulBufferLength = ( unsigned long ) ( pcTraceBuffer - pcTraceBufferStart );\r
\r
return ulBufferLength;\r
}\r
\r
void vTaskCleanUpResources( void )\r
{\r
- unsigned portSHORT usQueue;\r
+ unsigned short usQueue;\r
volatile tskTCB *pxTCB;\r
\r
- usQueue = ( unsigned portSHORT ) uxTopUsedPriority + ( unsigned portSHORT ) 1;\r
+ usQueue = ( unsigned short ) uxTopUsedPriority + ( unsigned short ) 1;\r
\r
/* Remove any TCB's from the ready queues. */\r
do\r
\r
prvDeleteTCB( ( tskTCB * ) pxTCB );\r
}\r
- }while( usQueue > ( unsigned portSHORT ) tskIDLE_PRIORITY );\r
+ }while( usQueue > ( unsigned short ) tskIDLE_PRIORITY );\r
\r
/* Remove any TCB's from the delayed queue. */\r
while( !listLIST_IS_EMPTY( &xDelayedTaskList1 ) )\r
\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
{\r
- unsigned portLONG ulTempCounter = portGET_RUN_TIME_COUNTER_VALUE();\r
+ unsigned long ulTempCounter = portGET_RUN_TIME_COUNTER_VALUE();\r
\r
/* Add the amount of time the task has been running to the accumulated\r
time so far. The time the task started running was stored in\r
\r
\r
\r
-static void prvInitialiseTCBVariables( tskTCB *pxTCB, const signed portCHAR * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, unsigned portSHORT usStackDepth )\r
+static void prvInitialiseTCBVariables( tskTCB *pxTCB, const signed char * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, unsigned short usStackDepth )\r
{\r
/* Store the function name in the TCB. */\r
#if configMAX_TASK_NAME_LEN > 1\r
{\r
/* Don't bring strncpy into the build unnecessarily. */\r
- strncpy( ( char * ) pxTCB->pcTaskName, ( const char * ) pcName, ( unsigned portSHORT ) configMAX_TASK_NAME_LEN );\r
+ strncpy( ( char * ) pxTCB->pcTaskName, ( const char * ) pcName, ( unsigned short ) configMAX_TASK_NAME_LEN );\r
}\r
#endif\r
- pxTCB->pcTaskName[ ( unsigned portSHORT ) configMAX_TASK_NAME_LEN - ( unsigned portSHORT ) 1 ] = '\0';\r
+ pxTCB->pcTaskName[ ( unsigned short ) configMAX_TASK_NAME_LEN - ( unsigned short ) 1 ] = '\0';\r
\r
/* This is used as an array index so must ensure it's not too large. First\r
remove the privilege bit if one is present. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static tskTCB *prvAllocateTCBAndStack( unsigned portSHORT usStackDepth, portSTACK_TYPE *puxStackBuffer )\r
+static tskTCB *prvAllocateTCBAndStack( unsigned short usStackDepth, portSTACK_TYPE *puxStackBuffer )\r
{\r
tskTCB *pxNewTCB;\r
\r
\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
\r
- static void prvListTaskWithinSingleList( const signed portCHAR *pcWriteBuffer, xList *pxList, signed portCHAR cStatus )\r
+ static void prvListTaskWithinSingleList( const signed char *pcWriteBuffer, xList *pxList, signed char cStatus )\r
{\r
volatile tskTCB *pxNextTCB, *pxFirstTCB;\r
- unsigned portSHORT usStackRemaining;\r
+ unsigned short usStackRemaining;\r
\r
/* Write the details of all the TCB's in pxList into the buffer. */\r
listGET_OWNER_OF_NEXT_ENTRY( pxFirstTCB, pxList );\r
do\r
{\r
listGET_OWNER_OF_NEXT_ENTRY( pxNextTCB, pxList );\r
- usStackRemaining = usTaskCheckFreeStackSpace( ( unsigned portCHAR * ) pxNextTCB->pxStack );\r
- sprintf( pcStatusString, ( portCHAR * ) "%s\t\t%c\t%u\t%u\t%u\r\n", pxNextTCB->pcTaskName, cStatus, ( unsigned int ) pxNextTCB->uxPriority, usStackRemaining, ( unsigned int ) pxNextTCB->uxTCBNumber );\r
- strcat( ( portCHAR * ) pcWriteBuffer, ( portCHAR * ) pcStatusString );\r
+ usStackRemaining = usTaskCheckFreeStackSpace( ( unsigned char * ) pxNextTCB->pxStack );\r
+ sprintf( pcStatusString, ( char * ) "%s\t\t%c\t%u\t%u\t%u\r\n", pxNextTCB->pcTaskName, cStatus, ( unsigned int ) pxNextTCB->uxPriority, usStackRemaining, ( unsigned int ) pxNextTCB->uxTCBNumber );\r
+ strcat( ( char * ) pcWriteBuffer, ( char * ) pcStatusString );\r
\r
} while( pxNextTCB != pxFirstTCB );\r
}\r
\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
\r
- static void prvGenerateRunTimeStatsForTasksInList( const signed portCHAR *pcWriteBuffer, xList *pxList, unsigned portLONG ulTotalRunTime )\r
+ static void prvGenerateRunTimeStatsForTasksInList( const signed char *pcWriteBuffer, xList *pxList, unsigned long ulTotalRunTime )\r
{\r
volatile tskTCB *pxNextTCB, *pxFirstTCB;\r
- unsigned portLONG ulStatsAsPercentage;\r
+ unsigned long ulStatsAsPercentage;\r
\r
/* Write the run time stats of all the TCB's in pxList into the buffer. */\r
listGET_OWNER_OF_NEXT_ENTRY( pxFirstTCB, pxList );\r
if( pxNextTCB->ulRunTimeCounter == 0 )\r
{\r
/* The task has used no CPU time at all. */\r
- sprintf( pcStatsString, ( portCHAR * ) "%s\t\t0\t\t0%%\r\n", pxNextTCB->pcTaskName );\r
+ sprintf( pcStatsString, ( char * ) "%s\t\t0\t\t0%%\r\n", pxNextTCB->pcTaskName );\r
}\r
else\r
{\r
\r
if( ulStatsAsPercentage > 0UL )\r
{\r
- sprintf( pcStatsString, ( portCHAR * ) "%s\t\t%u\t\t%u%%\r\n", pxNextTCB->pcTaskName, ( unsigned int ) pxNextTCB->ulRunTimeCounter, ( unsigned int ) ulStatsAsPercentage );\r
+ sprintf( pcStatsString, ( char * ) "%s\t\t%u\t\t%u%%\r\n", pxNextTCB->pcTaskName, ( unsigned int ) pxNextTCB->ulRunTimeCounter, ( unsigned int ) ulStatsAsPercentage );\r
}\r
else\r
{\r
/* If the percentage is zero here then the task has\r
consumed less than 1% of the total run time. */\r
- sprintf( pcStatsString, ( portCHAR * ) "%s\t\t%u\t\t<1%%\r\n", pxNextTCB->pcTaskName, ( unsigned int ) pxNextTCB->ulRunTimeCounter );\r
+ sprintf( pcStatsString, ( char * ) "%s\t\t%u\t\t<1%%\r\n", pxNextTCB->pcTaskName, ( unsigned int ) pxNextTCB->ulRunTimeCounter );\r
}\r
}\r
\r
- strcat( ( portCHAR * ) pcWriteBuffer, ( portCHAR * ) pcStatsString );\r
+ strcat( ( char * ) pcWriteBuffer, ( char * ) pcStatsString );\r
}\r
\r
} while( pxNextTCB != pxFirstTCB );\r
\r
#if ( ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) )\r
\r
- static unsigned portSHORT usTaskCheckFreeStackSpace( const unsigned portCHAR * pucStackByte )\r
+ static unsigned short usTaskCheckFreeStackSpace( const unsigned char * pucStackByte )\r
{\r
- register unsigned portSHORT usCount = 0;\r
+ register unsigned short usCount = 0;\r
\r
while( *pucStackByte == tskSTACK_FILL_BYTE )\r
{\r
unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( xTaskHandle xTask )\r
{\r
tskTCB *pxTCB;\r
- unsigned portCHAR *pcEndOfStack;\r
+ unsigned char *pcEndOfStack;\r
unsigned portBASE_TYPE uxReturn;\r
\r
pxTCB = prvGetTCBFromHandle( xTask );\r
\r
#if portSTACK_GROWTH < 0\r
{\r
- pcEndOfStack = ( unsigned portCHAR * ) pxTCB->pxStack;\r
+ pcEndOfStack = ( unsigned char * ) pxTCB->pxStack;\r
}\r
#else\r
{\r
- pcEndOfStack = ( unsigned portCHAR * ) pxTCB->pxEndOfStack;\r
+ pcEndOfStack = ( unsigned char * ) pxTCB->pxEndOfStack;\r
}\r
#endif\r
\r