* preferably in ROM/Flash), not on the stack.\r
*/\r
#if configQUEUE_REGISTRY_SIZE > 0\r
- void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName ) PRIVILEGED_FUNCTION;\r
+ void vQueueAddToRegistry( xQueueHandle xQueue, char *pcName ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
#endif\r
\r
/*\r
typedef struct xTASK_PARAMETERS\r
{\r
pdTASK_CODE pvTaskCode;\r
- const signed char * const pcName;\r
+ const char * const pcName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
unsigned short usStackDepth;\r
void *pvParameters;\r
unsigned portBASE_TYPE uxPriority;\r
typedef struct xTASK_STATUS\r
{\r
xTaskHandle xHandle; /* The handle of the task to which the rest of the information in the structure relates. */\r
- const signed char *pcTaskName; /* A pointer to the task's name. This value will be invalid if the task was deleted since the structure was populated! */\r
+ const char *pcTaskName; /* A pointer to the task's name. This value will be invalid if the task was deleted since the structure was populated! */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
unsigned portBASE_TYPE xTaskNumber; /* A number unique to the task. */\r
eTaskState eCurrentState; /* The state in which the task existed when the structure was populated. */\r
unsigned portBASE_TYPE uxCurrentPriority; /* The priority at which the task was running (may be inherited) when the structure was populated. */\r
*<pre>\r
portBASE_TYPE xTaskCreate(\r
pdTASK_CODE pvTaskCode,\r
- const signed char * const pcName,\r
+ const char * const pcName,\r
unsigned short usStackDepth,\r
void *pvParameters,\r
unsigned portBASE_TYPE uxPriority,\r
\r
/**\r
* task. h\r
- * <PRE>signed char *pcTaskGetTaskName( xTaskHandle xTaskToQuery );</PRE>\r
+ * <PRE>char *pcTaskGetTaskName( xTaskHandle xTaskToQuery );</PRE>\r
*\r
* @return The text (human readable) name of the task referenced by the handle\r
* xTaskToQuery. A task can query its own name by either passing in its own\r
* \defgroup pcTaskGetTaskName pcTaskGetTaskName\r
* \ingroup TaskUtils\r
*/\r
-signed char *pcTaskGetTaskName( xTaskHandle xTaskToQuery );\r
+char *pcTaskGetTaskName( xTaskHandle xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
\r
/**\r
* task.h\r
// This example demonstrates how a human readable table of run time stats\r
// information is generated from raw data provided by uxTaskGetSystemState().\r
// The human readable table is written to pcWriteBuffer\r
- void vTaskGetRunTimeStats( signed char *pcWriteBuffer )\r
+ void vTaskGetRunTimeStats( char *pcWriteBuffer )\r
{\r
xTaskStatusType *pxTaskStatusArray;\r
volatile unsigned portBASE_TYPE uxArraySize, x;\r
\r
if( ulStatsAsPercentage > 0UL )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, ( char * ) "%s\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter, ulStatsAsPercentage );\r
+ sprintf( pcWriteBuffer, "%s\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter, 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( ( char * ) pcWriteBuffer, ( char * ) "%s\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter );\r
+ sprintf( pcWriteBuffer, "%s\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter );\r
}\r
\r
pcWriteBuffer += strlen( ( char * ) pcWriteBuffer );\r
* \defgroup vTaskList vTaskList\r
* \ingroup TaskUtils\r
*/\r
-void vTaskList( signed char * pcWriteBuffer ) PRIVILEGED_FUNCTION;\r
+void vTaskList( char * pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
\r
/**\r
* task. h\r
* \defgroup vTaskGetRunTimeStats vTaskGetRunTimeStats\r
* \ingroup TaskUtils\r
*/\r
-void vTaskGetRunTimeStats( signed char *pcWriteBuffer ) PRIVILEGED_FUNCTION;\r
+void vTaskGetRunTimeStats( char *pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
\r
/*-----------------------------------------------------------\r
* SCHEDULER INTERNALS AVAILABLE FOR PORTING PURPOSES\r
* Generic version of the task creation function which is in turn called by the\r
* xTaskCreate() and xTaskCreateRestricted() macros.\r
*/\r
-signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const signed char * const pcName, const unsigned short usStackDepth, void * const pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle * const pxCreatedTask, portSTACK_TYPE * const puxStackBuffer, const xMemoryRegion * const xRegions ) PRIVILEGED_FUNCTION;\r
+signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const char * const pcName, const unsigned short usStackDepth, void * const pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle * const pxCreatedTask, portSTACK_TYPE * const puxStackBuffer, const xMemoryRegion * const xRegions ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
\r
/*\r
* Get the uxTCBNumber assigned to the task referenced by the xTask parameter.\r
typedef void (*tmrTIMER_CALLBACK)( xTimerHandle xTimer );\r
\r
/**\r
- * xTimerHandle xTimerCreate( const signed char * const pcTimerName,\r
+ * xTimerHandle xTimerCreate( const char * const pcTimerName,\r
* portTickType xTimerPeriodInTicks,\r
* unsigned portBASE_TYPE uxAutoReload,\r
* void * pvTimerID,\r
* }\r
* @endverbatim\r
*/\r
-xTimerHandle xTimerCreate( const signed char * const pcTimerName, const portTickType xTimerPeriodInTicks, const unsigned portBASE_TYPE uxAutoReload, void * const pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION;\r
+xTimerHandle xTimerCreate( const char * const pcTimerName, const portTickType xTimerPeriodInTicks, const unsigned portBASE_TYPE uxAutoReload, void * const pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
\r
/**\r
* void *pvTimerGetTimerID( xTimerHandle xTimer );\r
/*\r
* Prototypes for all the MPU wrappers.\r
*/\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
+signed portBASE_TYPE MPU_xTaskGenericCreate( pdTASK_CODE pvTaskCode, const char * const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions );\r
void MPU_vTaskAllocateMPURegions( xTaskHandle xTask, const xMemoryRegion * const xRegions );\r
void MPU_vTaskDelete( xTaskHandle pxTaskToDelete );\r
void MPU_vTaskDelayUntil( portTickType * const pxPreviousWakeTime, portTickType xTimeIncrement );\r
signed portBASE_TYPE MPU_xTaskResumeAll( void );\r
portTickType MPU_xTaskGetTickCount( void );\r
unsigned portBASE_TYPE MPU_uxTaskGetNumberOfTasks( void );\r
-void MPU_vTaskList( signed char *pcWriteBuffer );\r
-void MPU_vTaskGetRunTimeStats( signed char *pcWriteBuffer );\r
+void MPU_vTaskList( char *pcWriteBuffer );\r
+void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer );\r
void MPU_vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxTagValue );\r
pdTASK_HOOK_CODE MPU_xTaskGetApplicationTaskTag( xTaskHandle xTask );\r
portBASE_TYPE MPU_xTaskCallApplicationTaskHook( xTaskHandle xTask, void *pvParameter );\r
portBASE_TYPE MPU_xQueueGiveMutexRecursive( xQueueHandle xMutex );\r
signed portBASE_TYPE MPU_xQueueAltGenericSend( xQueueHandle pxQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition );\r
signed portBASE_TYPE MPU_xQueueAltGenericReceive( xQueueHandle pxQueue, void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking );\r
-void MPU_vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName );\r
+void MPU_vQueueAddToRegistry( xQueueHandle xQueue, char *pcName );\r
void MPU_vQueueDelete( xQueueHandle xQueue );\r
void *MPU_pvPortMalloc( size_t xSize );\r
void MPU_vPortFree( void *pv );\r
}\r
/*-----------------------------------------------------------*/\r
\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
+signed portBASE_TYPE MPU_xTaskGenericCreate( pdTASK_CODE pvTaskCode, const 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
#if ( configUSE_TRACE_FACILITY == 1 )\r
- void MPU_vTaskList( signed char *pcWriteBuffer )\r
+ void MPU_vTaskList( char *pcWriteBuffer )\r
{\r
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
\r
/*-----------------------------------------------------------*/\r
\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
- void MPU_vTaskGetRunTimeStats( signed char *pcWriteBuffer )\r
+ void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer )\r
{\r
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
\r
/*-----------------------------------------------------------*/\r
\r
#if configQUEUE_REGISTRY_SIZE > 0\r
- void MPU_vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName )\r
+ void MPU_vQueueAddToRegistry( xQueueHandle xQueue, char *pcName )\r
{\r
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();\r
\r
/*\r
- FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
* Created as a high priority thread, this function uses a timer to simulate\r
* a tick interrupt being generated on an embedded target. In this Windows\r
- * environment the timer does not achieve anything approaching real time \r
+ * environment the timer does not achieve anything approaching real time\r
* performance though.\r
*/\r
static DWORD WINAPI prvSimulatedPeripheralTimer( LPVOID lpParameter );\r
\r
-/* \r
- * Process all the simulated interrupts - each represented by a bit in \r
+/*\r
+ * Process all the simulated interrupts - each represented by a bit in\r
* ulPendingInterrupts variable.\r
*/\r
static void prvProcessSimulatedInterrupts( void );\r
/* The WIN32 simulator runs each task in a thread. The context switching is\r
managed by the threads, so the task stack does not have to be managed directly,\r
although the task stack is still used to hold an xThreadState structure this is\r
-the only thing it will ever hold. The structure indirectly maps the task handle \r
+the only thing it will ever hold. The structure indirectly maps the task handle\r
to a thread handle. */\r
typedef struct\r
{\r
bit represents one interrupt, so a maximum of 32 interrupts can be simulated. */\r
static volatile unsigned long ulPendingInterrupts = 0UL;\r
\r
-/* An event used to inform the simulated interrupt processing thread (a high \r
+/* An event used to inform the simulated interrupt processing thread (a high\r
priority thread that simulated interrupt processing) that an interrupt is\r
pending. */\r
static void *pvInterruptEvent = NULL;\r
\r
-/* Mutex used to protect all the simulated interrupt variables that are accessed \r
+/* Mutex used to protect all the simulated interrupt variables that are accessed\r
by multiple threads. */\r
static void *pvInterruptEventMutex = NULL;\r
\r
-/* The critical nesting count for the currently executing task. This is \r
-initialised to a non-zero value so interrupts do not become enabled during \r
-the initialisation phase. As each task has its own critical nesting value \r
-ulCriticalNesting will get set to zero when the first task runs. This \r
+/* The critical nesting count for the currently executing task. This is\r
+initialised to a non-zero value so interrupts do not become enabled during\r
+the initialisation phase. As each task has its own critical nesting value\r
+ulCriticalNesting will get set to zero when the first task runs. This\r
initialisation is probably not critical in this simulated environment as the\r
-simulated interrupt handlers do not get created until the FreeRTOS scheduler is \r
+simulated interrupt handlers do not get created until the FreeRTOS scheduler is\r
started anyway. */\r
static unsigned long ulCriticalNesting = 9999UL;\r
\r
\r
for(;;)\r
{\r
- /* Wait until the timer expires and we can access the simulated interrupt \r
- variables. *NOTE* this is not a 'real time' way of generating tick \r
- events as the next wake time should be relative to the previous wake \r
- time, not the time that Sleep() is called. It is done this way to \r
- prevent overruns in this very non real time simulated/emulated \r
+ /* Wait until the timer expires and we can access the simulated interrupt\r
+ variables. *NOTE* this is not a 'real time' way of generating tick\r
+ events as the next wake time should be relative to the previous wake\r
+ time, not the time that Sleep() is called. It is done this way to\r
+ prevent overruns in this very non real time simulated/emulated\r
environment. */\r
if( portTICK_RATE_MS < xMinimumWindowsBlockTime )\r
{\r
/* The timer has expired, generate the simulated tick event. */\r
ulPendingInterrupts |= ( 1 << portINTERRUPT_TICK );\r
\r
- /* The interrupt is now pending - notify the simulated interrupt \r
+ /* The interrupt is now pending - notify the simulated interrupt\r
handler thread. */\r
if( ulCriticalNesting == 0 )\r
{\r
SetEvent( pvInterruptEvent );\r
}\r
\r
- /* Give back the mutex so the simulated interrupt handler unblocks \r
+ /* Give back the mutex so the simulated interrupt handler unblocks\r
and can access the interrupt handler variables. */\r
ReleaseMutex( pvInterruptEventMutex );\r
}\r
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )\r
{\r
xThreadState *pxThreadState = NULL;\r
-char *pcTopOfStack = ( char * ) pxTopOfStack;\r
+signed char *pcTopOfStack = ( char * ) pxTopOfStack;\r
\r
/* In this simulated case a stack is not initialised, but instead a thread\r
is created that will execute the task being created. The thread handles\r
SetThreadAffinityMask( pxThreadState->pvThread, 0x01 );\r
SetThreadPriorityBoost( pxThreadState->pvThread, TRUE );\r
SetThreadPriority( pxThreadState->pvThread, THREAD_PRIORITY_IDLE );\r
- \r
+\r
return ( portSTACK_TYPE * ) pxThreadState;\r
}\r
/*-----------------------------------------------------------*/\r
lSuccess = pdFAIL;\r
}\r
\r
- /* Set the priority of this thread such that it is above the priority of \r
+ /* Set the priority of this thread such that it is above the priority of\r
the threads that run tasks. This higher priority is required to ensure\r
simulated interrupts take priority over tasks. */\r
pvHandle = GetCurrentThread();\r
{\r
lSuccess = pdFAIL;\r
}\r
- \r
+\r
if( lSuccess == pdPASS )\r
{\r
if( SetThreadPriority( pvHandle, THREAD_PRIORITY_NORMAL ) == 0 )\r
if( lSuccess == pdPASS )\r
{\r
/* Start the thread that simulates the timer peripheral to generate\r
- tick interrupts. The priority is set below that of the simulated \r
+ tick interrupts. The priority is set below that of the simulated\r
interrupt handler so the interrupt event mutex is used for the\r
handshake / overrun protection. */\r
pvHandle = CreateThread( NULL, 0, prvSimulatedPeripheralTimer, NULL, 0, NULL );\r
SetThreadPriorityBoost( pvHandle, TRUE );\r
SetThreadAffinityMask( pvHandle, 0x01 );\r
}\r
- \r
- /* Start the highest priority task by obtaining its associated thread \r
+\r
+ /* Start the highest priority task by obtaining its associated thread\r
state structure, in which is stored the thread handle. */\r
pxThreadState = ( xThreadState * ) *( ( unsigned long * ) pxCurrentTCB );\r
ulCriticalNesting = portNO_CRITICAL_NESTING;\r
behave as an embedded engineer might expect. */\r
ResumeThread( pxThreadState->pvThread );\r
\r
- /* Handle all simulated interrupts - including yield requests and \r
+ /* Handle all simulated interrupts - including yield requests and\r
simulated ticks. */\r
prvProcessSimulatedInterrupts();\r
- } \r
- \r
- /* Would not expect to return from prvProcessSimulatedInterrupts(), so should \r
+ }\r
+\r
+ /* Would not expect to return from prvProcessSimulatedInterrupts(), so should\r
not get here. */\r
return 0;\r
}\r
xThreadState *pxThreadState;\r
void *pvObjectList[ 2 ];\r
\r
- /* Going to block on the mutex that ensured exclusive access to the simulated \r
+ /* Going to block on the mutex that ensured exclusive access to the simulated\r
interrupt objects, and the event that signals that a simulated interrupt\r
should be processed. */\r
pvObjectList[ 0 ] = pvInterruptEventMutex;\r
pxThreadState = ( xThreadState *) *( ( unsigned long * ) pvOldCurrentTCB );\r
SuspendThread( pxThreadState->pvThread );\r
\r
- /* Obtain the state of the task now selected to enter the \r
+ /* Obtain the state of the task now selected to enter the\r
Running state. */\r
pxThreadState = ( xThreadState * ) ( *( unsigned long *) pxCurrentTCB );\r
ResumeThread( pxThreadState->pvThread );\r
ensure a context switch occurs away from this thread on the next tick. */\r
*pxPendYield = pdTRUE;\r
\r
- /* Mark the thread associated with this task as invalid so \r
+ /* Mark the thread associated with this task as invalid so\r
vPortDeleteThread() does not try to terminate it. */\r
pxThreadState->pvThread = NULL;\r
\r
be in a critical section as calls to wait for mutexes are accumulative. */\r
if( ulCriticalNesting == 0 )\r
{\r
- SetEvent( pvInterruptEvent ); \r
+ SetEvent( pvInterruptEvent );\r
}\r
\r
ReleaseMutex( pvInterruptEventMutex );\r
else\r
{\r
ulCriticalNesting++;\r
- } \r
+ }\r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
ulCriticalNesting--;\r
\r
- /* Were any interrupts set to pending while interrupts were \r
+ /* Were any interrupts set to pending while interrupts were\r
(simulated) disabled? */\r
if( ulPendingInterrupts != 0UL )\r
{\r
more user friendly. */\r
typedef struct QUEUE_REGISTRY_ITEM\r
{\r
- signed char *pcQueueName;\r
+ char *pcQueueName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
xQueueHandle xHandle;\r
} xQueueRegistryItem;\r
\r
\r
#if ( configQUEUE_REGISTRY_SIZE > 0 )\r
\r
- void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcQueueName )\r
+ void vQueueAddToRegistry( xQueueHandle xQueue, char *pcQueueName ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
{\r
unsigned portBASE_TYPE ux;\r
\r
xListItem xEventListItem; /*< Used to reference a task from an event list. */\r
unsigned portBASE_TYPE uxPriority; /*< The priority of the task. 0 is the lowest priority. */\r
portSTACK_TYPE *pxStack; /*< Points to the start of the stack. */\r
- signed char pcTaskName[ configMAX_TASK_NAME_LEN ];/*< Descriptive name given to the task when created. Facilitates debugging only. */\r
+ char pcTaskName[ configMAX_TASK_NAME_LEN ];/*< Descriptive name given to the task when created. Facilitates debugging only. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
\r
#if ( portSTACK_GROWTH > 0 )\r
portSTACK_TYPE *pxEndOfStack; /*< Points to the end of the stack on architectures where the stack grows up from low memory. */\r
/*\r
* Macros used by vListTask to indicate which state a task is in.\r
*/\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
+#define tskBLOCKED_CHAR ( 'B' )\r
+#define tskREADY_CHAR ( 'R' )\r
+#define tskDELETED_CHAR ( 'D' )\r
+#define tskSUSPENDED_CHAR ( 'S' )\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* Callback function prototypes. --------------------------*/\r
#if configCHECK_FOR_STACK_OVERFLOW > 0\r
- extern void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );\r
+ extern void vApplicationStackOverflowHook( xTaskHandle xTask, char *pcTaskName );\r
#endif\r
\r
#if configUSE_TICK_HOOK > 0\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 * const pxTCB, const signed char * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, const unsigned short usStackDepth ) PRIVILEGED_FUNCTION;\r
+static void prvInitialiseTCBVariables( tskTCB * const pxTCB, const char * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, const unsigned short usStackDepth ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
\r
/*\r
* Utility to ready all the lists used by the scheduler. This is called\r
\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const signed char * const pcName, const unsigned short usStackDepth, void * const pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle * const pxCreatedTask, portSTACK_TYPE * const puxStackBuffer, const xMemoryRegion * const xRegions )\r
+signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const char * const pcName, const unsigned short usStackDepth, void * const pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle * const pxCreatedTask, portSTACK_TYPE * const puxStackBuffer, const xMemoryRegion * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
{\r
signed portBASE_TYPE xReturn;\r
tskTCB * pxNewTCB;\r
\r
/* Only reset the event list item value if the value is not\r
being used for anything else. */\r
- if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0 )\r
+ if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL )\r
{\r
listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( ( portTickType ) configMAX_PRIORITIES - ( portTickType ) uxNewPriority ) ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */\r
}\r
{\r
/* Create the idle task, storing its handle in xIdleTaskHandle so it can\r
be returned by the xTaskGetIdleTaskHandle() function. */\r
- xReturn = xTaskCreate( prvIdleTask, ( signed char * ) "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), &xIdleTaskHandle ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */\r
+ xReturn = xTaskCreate( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), &xIdleTaskHandle ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */\r
}\r
#else\r
{\r
/* Create the idle task without storing its handle. */\r
- xReturn = xTaskCreate( prvIdleTask, ( signed char * ) "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), NULL ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */\r
+ xReturn = xTaskCreate( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), NULL ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */\r
}\r
#endif /* INCLUDE_xTaskGetIdleTaskHandle */\r
\r
\r
#if ( INCLUDE_pcTaskGetTaskName == 1 )\r
\r
- signed char *pcTaskGetTaskName( xTaskHandle xTaskToQuery )\r
+ char *pcTaskGetTaskName( xTaskHandle xTaskToQuery )\r
{\r
tskTCB *pxTCB;\r
\r
#endif /* configUSE_TICKLESS_IDLE */\r
/*-----------------------------------------------------------*/\r
\r
-static void prvInitialiseTCBVariables( tskTCB * const pxTCB, const signed char * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, const unsigned short usStackDepth )\r
+static void prvInitialiseTCBVariables( tskTCB * const pxTCB, const char * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, const unsigned short usStackDepth ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
{\r
unsigned portBASE_TYPE x;\r
\r
\r
/* Ensure the name string is terminated in the case that the string length\r
was greater or equal to configMAX_TASK_NAME_LEN. */\r
- pxTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = ( signed char ) '\0';\r
+ pxTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 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
listGET_OWNER_OF_NEXT_ENTRY( pxNextTCB, pxList );\r
\r
pxTaskStatusArray[ uxTask ].xHandle = ( xTaskHandle ) pxNextTCB;\r
- pxTaskStatusArray[ uxTask ].pcTaskName = ( const signed char * ) &( pxNextTCB->pcTaskName [ 0 ] );\r
+ pxTaskStatusArray[ uxTask ].pcTaskName = ( const char * ) &( pxNextTCB->pcTaskName [ 0 ] );\r
pxTaskStatusArray[ uxTask ].xTaskNumber = pxNextTCB->uxTCBNumber;\r
pxTaskStatusArray[ uxTask ].eCurrentState = eState;\r
pxTaskStatusArray[ uxTask ].uxCurrentPriority = pxNextTCB->uxPriority;\r
unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( xTaskHandle xTask )\r
{\r
tskTCB *pxTCB;\r
- unsigned char *pcEndOfStack;\r
+ unsigned char *pucEndOfStack;\r
unsigned portBASE_TYPE uxReturn;\r
\r
pxTCB = prvGetTCBFromHandle( xTask );\r
\r
#if portSTACK_GROWTH < 0\r
{\r
- pcEndOfStack = ( unsigned char * ) pxTCB->pxStack;\r
+ pucEndOfStack = ( unsigned char * ) pxTCB->pxStack;\r
}\r
#else\r
{\r
- pcEndOfStack = ( unsigned char * ) pxTCB->pxEndOfStack;\r
+ pucEndOfStack = ( unsigned char * ) pxTCB->pxEndOfStack;\r
}\r
#endif\r
\r
- uxReturn = ( unsigned portBASE_TYPE ) prvTaskCheckFreeStackSpace( pcEndOfStack );\r
+ uxReturn = ( unsigned portBASE_TYPE ) prvTaskCheckFreeStackSpace( pucEndOfStack );\r
\r
return uxReturn;\r
}\r
/* Adjust the mutex holder state to account for its new\r
priority. Only reset the event list item value if the value is\r
not being used for anything else. */\r
- if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0 )\r
+ if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL )\r
{\r
listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( portTickType ) configMAX_PRIORITIES - ( portTickType ) pxCurrentTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */\r
}\r
\r
/* Only reset the event list item value if the value is not\r
being used for anything else. */\r
- if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0 )\r
+ if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL )\r
{\r
listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( portTickType ) configMAX_PRIORITIES - ( portTickType ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */\r
}\r
\r
#if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS == 1 ) )\r
\r
- void vTaskList( signed char * pcWriteBuffer )\r
+ void vTaskList( char * pcWriteBuffer )\r
{\r
xTaskStatusType *pxTaskStatusArray;\r
volatile unsigned portBASE_TYPE uxArraySize, x;\r
- signed char cStatus;\r
+ char cStatus;\r
\r
/*\r
* PLEASE NOTE:\r
break;\r
}\r
\r
- sprintf( ( char * ) pcWriteBuffer, ( char * ) "%s\t\t%c\t%u\t%u\t%u\r\n", pxTaskStatusArray[ x ].pcTaskName, ( char ) cStatus, ( unsigned int ) pxTaskStatusArray[ x ].uxCurrentPriority, ( unsigned int ) pxTaskStatusArray[ x ].usStackHighWaterMark, ( unsigned int ) pxTaskStatusArray[ x ].xTaskNumber );\r
- pcWriteBuffer += strlen( ( char * ) pcWriteBuffer );\r
+ sprintf( pcWriteBuffer, "%s\t\t%c\t%u\t%u\t%u\r\n", pxTaskStatusArray[ x ].pcTaskName, cStatus, ( unsigned int ) pxTaskStatusArray[ x ].uxCurrentPriority, ( unsigned int ) pxTaskStatusArray[ x ].usStackHighWaterMark, ( unsigned int ) pxTaskStatusArray[ x ].xTaskNumber );\r
+ pcWriteBuffer += strlen( pcWriteBuffer );\r
}\r
\r
/* Free the array again. */\r
\r
#if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS == 1 ) )\r
\r
- void vTaskGetRunTimeStats( signed char *pcWriteBuffer )\r
+ void vTaskGetRunTimeStats( char *pcWriteBuffer )\r
{\r
xTaskStatusType *pxTaskStatusArray;\r
volatile unsigned portBASE_TYPE uxArraySize, x;\r
{\r
#ifdef portLU_PRINTF_SPECIFIER_REQUIRED\r
{\r
- sprintf( ( char * ) pcWriteBuffer, ( char * ) "%s\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter, ulStatsAsPercentage );\r
+ sprintf( pcWriteBuffer, "%s\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter, ulStatsAsPercentage );\r
}\r
#else\r
{\r
/* sizeof( int ) == sizeof( long ) so a smaller\r
printf() library can be used. */\r
- sprintf( ( char * ) pcWriteBuffer, ( char * ) "%s\t\t%u\t\t%u%%\r\n", pxTaskStatusArray[ x ].pcTaskName, ( unsigned int ) pxTaskStatusArray[ x ].ulRunTimeCounter, ( unsigned int ) ulStatsAsPercentage );\r
+ sprintf( pcWriteBuffer, "%s\t\t%u\t\t%u%%\r\n", pxTaskStatusArray[ x ].pcTaskName, ( unsigned int ) pxTaskStatusArray[ x ].ulRunTimeCounter, ( unsigned int ) ulStatsAsPercentage );\r
}\r
#endif\r
}\r
consumed less than 1% of the total run time. */\r
#ifdef portLU_PRINTF_SPECIFIER_REQUIRED\r
{\r
- sprintf( ( char * ) pcWriteBuffer, ( char * ) "%s\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter );\r
+ sprintf( pcWriteBuffer, "%s\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter );\r
}\r
#else\r
{\r
/* sizeof( int ) == sizeof( long ) so a smaller\r
printf() library can be used. */\r
- sprintf( ( char * ) pcWriteBuffer, ( char * ) "%s\t\t%u\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, ( unsigned int ) pxTaskStatusArray[ x ].ulRunTimeCounter );\r
+ sprintf( pcWriteBuffer, "%s\t\t%u\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, ( unsigned int ) pxTaskStatusArray[ x ].ulRunTimeCounter );\r
}\r
#endif\r
}\r
\r
- pcWriteBuffer += strlen( ( char * ) pcWriteBuffer );\r
+ pcWriteBuffer += strlen( pcWriteBuffer );\r
}\r
}\r
else\r
/* The definition of the timers themselves. */\r
typedef struct tmrTimerControl\r
{\r
- const signed char *pcTimerName; /*<< Text name. This is not used by the kernel, it is included simply to make debugging easier. */\r
+ const char *pcTimerName; /*<< Text name. This is not used by the kernel, it is included simply to make debugging easier. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
xListItem xTimerListItem; /*<< Standard linked list item as used by all kernel features for event management. */\r
portTickType xTimerPeriodInTicks;/*<< How quickly and often the timer expires. */\r
unsigned portBASE_TYPE uxAutoReload; /*<< Set to pdTRUE if the timer should be automatically restarted once expired. Set to pdFALSE if the timer is, in effect, a one-shot timer. */\r
{\r
/* Create the timer task, storing its handle in xTimerTaskHandle so\r
it can be returned by the xTimerGetTimerDaemonTaskHandle() function. */\r
- xReturn = xTaskCreate( prvTimerTask, ( signed char * ) "Tmr Svc", ( unsigned short ) configTIMER_TASK_STACK_DEPTH, NULL, ( ( unsigned portBASE_TYPE ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, &xTimerTaskHandle );\r
+ xReturn = xTaskCreate( prvTimerTask, "Tmr Svc", ( unsigned short ) configTIMER_TASK_STACK_DEPTH, NULL, ( ( unsigned portBASE_TYPE ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, &xTimerTaskHandle );\r
}\r
#else\r
{\r
/* Create the timer task without storing its handle. */\r
- xReturn = xTaskCreate( prvTimerTask, ( signed char * ) "Tmr Svc", ( unsigned short ) configTIMER_TASK_STACK_DEPTH, NULL, ( ( unsigned portBASE_TYPE ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, NULL);\r
+ xReturn = xTaskCreate( prvTimerTask, "Tmr Svc", ( unsigned short ) configTIMER_TASK_STACK_DEPTH, NULL, ( ( unsigned portBASE_TYPE ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, NULL);\r
}\r
#endif\r
}\r
}\r
/*-----------------------------------------------------------*/\r
\r
-xTimerHandle xTimerCreate( const signed char * const pcTimerName, const portTickType xTimerPeriodInTicks, const unsigned portBASE_TYPE uxAutoReload, void * const pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction )\r
+xTimerHandle xTimerCreate( const char * const pcTimerName, const portTickType xTimerPeriodInTicks, const unsigned portBASE_TYPE uxAutoReload, void * const pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
{\r
xTIMER *pxNewTimer;\r
\r
{\r
if( xTimerQueue != NULL )\r
{\r
- vQueueAddToRegistry( xTimerQueue, ( signed char * ) "TmrQ" );\r
+ vQueueAddToRegistry( xTimerQueue, "TmrQ" );\r
}\r
else\r
{\r