]> git.sur5r.net Git - freertos/commitdiff
Remove unnecessary use of portLONG, portCHAR and portSHORT.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 4 Oct 2009 18:34:36 +0000 (18:34 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 4 Oct 2009 18:34:36 +0000 (18:34 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@898 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/include/StackMacros.h
Source/include/croutine.h
Source/include/queue.h
Source/include/semphr.h
Source/include/task.h
Source/portable/GCC/ARM_CM3_MPU/port.c
Source/queue.c
Source/tasks.c

index a139e61c13392a1dd2c0933f5b4ed7ae757092b8..01f0f22f0f82f3f022971f69675090be8bc27828 100644 (file)
@@ -87,7 +87,7 @@
        /* 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
index 07c988434e226f9b9242893a67c500c4baafd977..57cf05f708319eb4c4e77919b67f28e04fed1b4f 100644 (file)
@@ -76,7 +76,7 @@ typedef struct corCoRoutineControlBlock
        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
@@ -208,7 +208,7 @@ void vCoRoutineSchedule( void );
  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
@@ -239,7 +239,7 @@ void vCoRoutineSchedule( void );
  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
@@ -553,7 +553,7 @@ void vCoRoutineSchedule( void );
  // 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
@@ -580,7 +580,7 @@ void vCoRoutineSchedule( void );
  // 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
@@ -653,7 +653,7 @@ void vCoRoutineSchedule( void );
  {\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
@@ -696,7 +696,7 @@ void vCoRoutineSchedule( void );
  // 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
index 8c176547b5a736f8f0c2f26f001199e9991601fb..e42f8a58de0ecd51614697ebfbdb4b18bf1ba9f1 100644 (file)
@@ -98,8 +98,8 @@ typedef void * xQueueHandle;
    <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
@@ -107,7 +107,7 @@ typedef void * xQueueHandle;
  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
@@ -165,11 +165,11 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
    <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
@@ -177,7 +177,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  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
@@ -247,11 +247,11 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
    <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
@@ -259,7 +259,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  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
@@ -331,11 +331,11 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
    <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
@@ -343,7 +343,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  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
@@ -419,11 +419,11 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
    <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
@@ -431,7 +431,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  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
@@ -506,8 +506,8 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
    <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
@@ -599,8 +599,8 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
    <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
@@ -698,8 +698,8 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
    <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
@@ -820,7 +820,7 @@ void vQueueDelete( xQueueHandle xQueue );
    <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
@@ -891,7 +891,7 @@ void vQueueDelete( xQueueHandle xQueue );
    <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
@@ -964,7 +964,7 @@ void vQueueDelete( xQueueHandle xQueue );
    <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
@@ -1042,7 +1042,7 @@ void vQueueDelete( xQueueHandle xQueue );
    <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
@@ -1108,11 +1108,11 @@ signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle pxQueue, const void
  // 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
@@ -1138,7 +1138,7 @@ signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle pxQueue, const void
  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
@@ -1151,7 +1151,7 @@ signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle pxQueue, const void
                // task will be woken.\r
        }\r
 \r
-       if( cTaskWokenByPost != ( portCHAR ) pdFALSE;\r
+       if( cTaskWokenByPost != ( char ) pdFALSE;\r
        {\r
                taskYIELD ();\r
        }\r
@@ -1241,7 +1241,7 @@ portBASE_TYPE xQueueGiveMutexRecursive( xQueueHandle xMutex );
  * 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
index 22d3009e82ebaf92dc4c1c458d5d1a945d55ebb7..fa1d3100bc68a2113d7eb992acba52774bd64552 100644 (file)
@@ -56,8 +56,8 @@
 \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
@@ -502,7 +502,7 @@ typedef xQueueHandle xSemaphoreHandle;
  // 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
index 9eff36f995b1f2a052a6916d49369a04e35a0dd8..2b5258568bc6f921fe6a58f5835b41a35ddc2ba8 100644 (file)
@@ -95,8 +95,8 @@ typedef struct xTIME_OUT
 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
@@ -105,8 +105,8 @@ typedef struct xMEMORY_REGION
 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
@@ -192,8 +192,8 @@ typedef struct xTASK_PARAMTERS
  *<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
@@ -894,7 +894,7 @@ void vTaskSuspendAll( void ) PRIVILEGED_FUNCTION;
 \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
@@ -972,7 +972,7 @@ portTickType xTaskGetTickCount( void ) PRIVILEGED_FUNCTION;
 \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
@@ -986,7 +986,7 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;
 \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
@@ -1008,11 +1008,11 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;
  * \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
@@ -1040,11 +1040,11 @@ void vTaskList( signed portCHAR *pcWriteBuffer ) PRIVILEGED_FUNCTION;
  * \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
@@ -1061,11 +1061,11 @@ void vTaskGetRunTimeStats( signed portCHAR *pcWriteBuffer ) PRIVILEGED_FUNCTION;
  * \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
@@ -1074,7 +1074,7 @@ void vTaskStartTrace( signed portCHAR * pcBuffer, unsigned portLONG ulBufferSize
  * \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
@@ -1250,7 +1250,7 @@ void vTaskPriorityDisinherit( xTaskHandle * const pxMutexHolder ) PRIVILEGED_FUN
  * 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
index 48fa7d8586e662ce70e9e0a3f78c36ee9f5ce3a6..f335e9c9f32d6957de65c6aa593ddf8ff4ad9918 100644 (file)
@@ -62,18 +62,18 @@ task.h is included from an application file. */
 #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
@@ -87,9 +87,9 @@ task.h is included from an application file. */
 #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
@@ -111,44 +111,44 @@ static unsigned portBASE_TYPE uxCriticalNesting = 0xaaaaaaaa;
 /*\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
@@ -366,7 +366,7 @@ void xPortPendSVHandler( void )
 \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
@@ -480,7 +480,7 @@ unsigned long ulRegionSize, ulReturnValue = 4;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-portBASE_TYPE prvRaisePrivilege( void )\r
+static portBASE_TYPE prvRaisePrivilege( void )\r
 {\r
        __asm volatile\r
        ( \r
@@ -498,7 +498,7 @@ portBASE_TYPE prvRaisePrivilege( void )
 }\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
@@ -594,7 +594,7 @@ unsigned long ul;
 }\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
@@ -748,7 +748,7 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-void MPU_vTaskList( signed portCHAR *pcWriteBuffer )\r
+void MPU_vTaskList( signed char *pcWriteBuffer )\r
 {\r
 portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
 \r
@@ -759,7 +759,7 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
 /*-----------------------------------------------------------*/\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
@@ -770,7 +770,7 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
 /*-----------------------------------------------------------*/\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
@@ -781,9 +781,9 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
 /*-----------------------------------------------------------*/\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
@@ -992,7 +992,7 @@ signed portBASE_TYPE xReturn;
 /*-----------------------------------------------------------*/\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
index f2fe31747d5c85de578fa2a6a3432aa2dcec1a2a..3bc2adef3bf0158852e20da90ca885360bcdc79b 100644 (file)
@@ -91,11 +91,11 @@ zero. */
  */\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
@@ -161,7 +161,7 @@ unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue
        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
@@ -173,7 +173,7 @@ unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue
        /* 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
@@ -253,7 +253,7 @@ size_t xQueueSizeInBytes;
                        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
@@ -638,7 +638,7 @@ xTimeOutType xTimeOut;
        {\r
        signed portBASE_TYPE xEntryTimeSet = pdFALSE;\r
        xTimeOutType xTimeOut;\r
-       signed portCHAR *pcOriginalReadPosition;\r
+       signed char *pcOriginalReadPosition;\r
 \r
                for( ;; )\r
                {\r
@@ -815,7 +815,7 @@ signed portBASE_TYPE xQueueGenericReceive( xQueueHandle pxQueue, void * const pv
 {\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
@@ -1414,7 +1414,7 @@ signed portBASE_TYPE xReturn;
 \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
index 306e60fa4e156e332ff29a80c43d4568019db43f..1005895cf97a06cb33d4e90162921654ae7a45c4 100644 (file)
@@ -84,7 +84,7 @@ typedef struct tskTaskControlBlock
        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
@@ -107,7 +107,7 @@ typedef struct tskTaskControlBlock
        #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
@@ -160,9 +160,9 @@ PRIVILEGED_DATA static unsigned portBASE_TYPE uxTaskNumber                                          = ( unsigned po
 \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
@@ -177,23 +177,23 @@ PRIVILEGED_DATA static unsigned portBASE_TYPE uxTaskNumber                                                = ( unsigned po
 /*\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
@@ -216,10 +216,10 @@ PRIVILEGED_DATA static unsigned portBASE_TYPE uxTaskNumber                                                = ( unsigned po
                                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
@@ -297,7 +297,7 @@ register tskTCB *pxTCB;                                                                                                                                                                                             \
  * 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
@@ -342,7 +342,7 @@ static void prvCheckTasksWaitingTermination( void ) PRIVILEGED_FUNCTION;
  * 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
@@ -355,7 +355,7 @@ static tskTCB *prvAllocateTCBAndStack( unsigned portSHORT usStackDepth, portSTAC
  */\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
@@ -366,7 +366,7 @@ static tskTCB *prvAllocateTCBAndStack( unsigned portSHORT usStackDepth, portSTAC
  */\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
@@ -379,7 +379,7 @@ static tskTCB *prvAllocateTCBAndStack( unsigned portSHORT usStackDepth, portSTAC
  * 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
@@ -411,7 +411,7 @@ portBASE_TYPE xRunPrivileged;
                #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
@@ -1017,7 +1017,7 @@ void vTaskStartScheduler( void )
 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
@@ -1180,7 +1180,7 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
 \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
@@ -1192,8 +1192,8 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
                        /* 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
@@ -1205,7 +1205,7 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
                                {\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
@@ -1243,10 +1243,10 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
 \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
@@ -1257,8 +1257,8 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
                        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
@@ -1270,7 +1270,7 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
                                {\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
@@ -1308,11 +1308,11 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
 \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
@@ -1325,15 +1325,15 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
 \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
@@ -1408,10 +1408,10 @@ void vTaskIncrementTick( void )
 \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
@@ -1425,7 +1425,7 @@ void vTaskIncrementTick( void )
 \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
@@ -1558,7 +1558,7 @@ void vTaskSwitchContext( void )
 \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
@@ -1836,16 +1836,16 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
 \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
@@ -1989,7 +1989,7 @@ static void prvCheckTasksWaitingTermination( void )
 }\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
@@ -2023,19 +2023,19 @@ tskTCB *pxNewTCB;
 \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
@@ -2045,10 +2045,10 @@ tskTCB *pxNewTCB;
 \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
@@ -2064,7 +2064,7 @@ tskTCB *pxNewTCB;
                                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
@@ -2074,17 +2074,17 @@ tskTCB *pxNewTCB;
 \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
@@ -2095,9 +2095,9 @@ tskTCB *pxNewTCB;
 \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
@@ -2118,18 +2118,18 @@ tskTCB *pxNewTCB;
        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