*/\r
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
BaseType_t xTaskCreate( TaskFunction_t pxTaskCode,\r
- const char * const pcName,\r
+ const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const uint16_t usStackDepth,\r
void * const pvParameters,\r
UBaseType_t uxPriority,\r
- TaskHandle_t * const pxCreatedTask ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ TaskHandle_t * const pxCreatedTask ) PRIVILEGED_FUNCTION;\r
#endif\r
\r
/**\r
*/\r
#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
TaskHandle_t xTaskCreateStatic( TaskFunction_t pxTaskCode,\r
- const char * const pcName,\r
+ const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const uint32_t ulStackDepth,\r
void * const pvParameters,\r
UBaseType_t uxPriority,\r
StackType_t * const puxStackBuffer,\r
- StaticTask_t * const pxTaskBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ StaticTask_t * const pxTaskBuffer ) PRIVILEGED_FUNCTION;\r
#endif /* configSUPPORT_STATIC_ALLOCATION */\r
\r
/**\r
* @endverbatim\r
*/\r
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
- TimerHandle_t xTimerCreate( const char * const pcTimerName,\r
+ TimerHandle_t xTimerCreate( const char * const pcTimerName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const TickType_t xTimerPeriodInTicks,\r
const UBaseType_t uxAutoReload,\r
void * const pvTimerID,\r
- TimerCallbackFunction_t pxCallbackFunction ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ TimerCallbackFunction_t pxCallbackFunction ) PRIVILEGED_FUNCTION;\r
#endif\r
\r
/**\r
* @endverbatim\r
*/\r
#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
- TimerHandle_t xTimerCreateStatic( const char * const pcTimerName,\r
+ TimerHandle_t xTimerCreateStatic( const char * const pcTimerName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const TickType_t xTimerPeriodInTicks,\r
const UBaseType_t uxAutoReload,\r
void * const pvTimerID,\r
TimerCallbackFunction_t pxCallbackFunction,\r
- StaticTimer_t *pxTimerBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ StaticTimer_t *pxTimerBuffer ) PRIVILEGED_FUNCTION;\r
#endif /* configSUPPORT_STATIC_ALLOCATION */\r
\r
/**\r
can be assumed there is no mutex holder and no need to determine if\r
priority disinheritance is needed. Simply increase the count of\r
messages (semaphores) available. */\r
- pxQueue->uxMessagesWaiting = uxMessagesWaiting + 1;\r
+ pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1;\r
\r
/* The event list is not altered if the queue is locked. This will\r
be done when the queue is unlocked later. */\r
traceQUEUE_RECEIVE( pxQueue );\r
\r
/* Actually removing data, not just peeking. */\r
- pxQueue->uxMessagesWaiting = uxMessagesWaiting - 1;\r
+ pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;\r
\r
#if ( configUSE_MUTEXES == 1 )\r
{\r
traceQUEUE_RECEIVE_FROM_ISR( pxQueue );\r
\r
prvCopyDataFromQueue( pxQueue, pvBuffer );\r
- pxQueue->uxMessagesWaiting = uxMessagesWaiting - 1;\r
+ pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;\r
\r
/* If the queue is locked the event list will not be modified.\r
Instead update the lock count so the task that unlocks the queue\r
}\r
}\r
\r
- pxQueue->uxMessagesWaiting = uxMessagesWaiting + 1;\r
+ pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1;\r
\r
return xReturn;\r
}\r
}\r
\r
return pcReturn;\r
- }\r
+ } /*lint !e818 xQueue cannot be a pointer to const because it is a typedef. */\r
\r
#endif /* configQUEUE_REGISTRY_SIZE */\r
/*-----------------------------------------------------------*/\r
{\r
QueueSetHandle_t pxQueue;\r
\r
- pxQueue = xQueueGenericCreate( uxEventQueueLength, sizeof( Queue_t * ), queueQUEUE_TYPE_SET );\r
+ pxQueue = xQueueGenericCreate( uxEventQueueLength, ( UBaseType_t ) sizeof( Queue_t * ), queueQUEUE_TYPE_SET );\r
\r
return pxQueue;\r
}\r
\r
/* See the comments above the definition of\r
tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE. */\r
- #if( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )\r
+ #if( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) /*lint !e731 Macro has been consolidated for readability reasons. */\r
uint8_t ucStaticallyAllocated; /*< Set to pdTRUE if the task is a statically allocated to ensure no attempt is made to free the memory. */\r
#endif\r
\r
* dynamically to fill in the structure's members.\r
*/\r
static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,\r
- const char * const pcName,\r
+ const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const uint32_t ulStackDepth,\r
void * const pvParameters,\r
UBaseType_t uxPriority,\r
TaskHandle_t * const pxCreatedTask,\r
TCB_t *pxNewTCB,\r
- const MemoryRegion_t * const xRegions ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ const MemoryRegion_t * const xRegions ) PRIVILEGED_FUNCTION;\r
\r
/*\r
* Called after a new task has been created and initialised to place the task\r
#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
\r
TaskHandle_t xTaskCreateStatic( TaskFunction_t pxTaskCode,\r
- const char * const pcName,\r
+ const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const uint32_t ulStackDepth,\r
void * const pvParameters,\r
UBaseType_t uxPriority,\r
StackType_t * const puxStackBuffer,\r
- StaticTask_t * const pxTaskBuffer ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ StaticTask_t * const pxTaskBuffer )\r
{\r
TCB_t *pxNewTCB;\r
TaskHandle_t xReturn;\r
pxNewTCB = ( TCB_t * ) pxTaskBuffer; /*lint !e740 Unusual cast is ok as the structures are designed to have the same alignment, and the size is checked by an assert. */\r
pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer;\r
\r
- #if( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )\r
+ #if( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) /*lint !e731 Macro has been consolidated for readability reasons. */\r
{\r
/* Tasks can be created statically or dynamically, so note this\r
task was created statically in case the task is later deleted. */\r
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
\r
BaseType_t xTaskCreate( TaskFunction_t pxTaskCode,\r
- const char * const pcName,\r
+ const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const uint16_t usStackDepth,\r
void * const pvParameters,\r
UBaseType_t uxPriority,\r
- TaskHandle_t * const pxCreatedTask ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ TaskHandle_t * const pxCreatedTask )\r
{\r
TCB_t *pxNewTCB;\r
BaseType_t xReturn;\r
\r
if( pxNewTCB != NULL )\r
{\r
- #if( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )\r
+ #if( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) /*lint !e731 Macro has been consolidated for readability reasons. */\r
{\r
/* Tasks can be created statically or dynamically, so note this\r
task was created dynamically in case it is later deleted. */\r
/*-----------------------------------------------------------*/\r
\r
static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,\r
- const char * const pcName,\r
+ const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const uint32_t ulStackDepth,\r
void * const pvParameters,\r
UBaseType_t uxPriority,\r
TaskHandle_t * const pxCreatedTask,\r
TCB_t *pxNewTCB,\r
- const MemoryRegion_t * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ const MemoryRegion_t * const xRegions )\r
{\r
StackType_t *pxTopOfStack;\r
UBaseType_t x;\r
{\r
/* Is it in the suspended list because it is in the Suspended\r
state, or because is is blocked with no timeout? */\r
- if( listIS_CONTAINED_WITHIN( NULL, &( pxTCB->xEventListItem ) ) != pdFALSE )\r
+ if( listIS_CONTAINED_WITHIN( NULL, &( pxTCB->xEventListItem ) ) != pdFALSE ) /*lint !e961. The cast is only redundant when NULL is used. */\r
{\r
xReturn = pdTRUE;\r
}\r
xIdleTaskHandle = xTaskCreateStatic( prvIdleTask,\r
"IDLE",\r
ulIdleTaskStackSize,\r
- ( void * ) NULL,\r
+ ( void * ) NULL, /*lint !e961. The cast is not redundant for all compilers. */\r
( tskIDLE_PRIORITY | portPRIVILEGE_BIT ),\r
pxIdleTaskStackBuffer,\r
pxIdleTaskTCBBuffer ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */\r
{\r
/* Minor optimisation. The tick count cannot change in this\r
block. */\r
- const TickType_t xConstTickCount = xTickCount + 1;\r
+ const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1;\r
\r
/* Increment the RTOS tick, switching the delayed and overflowed\r
delayed lists if it wraps to 0. */\r
xTickCount = xConstTickCount;\r
\r
- if( xConstTickCount == ( TickType_t ) 0U )\r
+ if( xConstTickCount == ( TickType_t ) 0U ) /*lint !e774 'if' does not always evaluate to false as it is looking for an overflow. */\r
{\r
taskSWITCH_DELAYED_LISTS();\r
}\r
vPortFree( pxTCB->pxStack );\r
vPortFree( pxTCB );\r
}\r
- #elif( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE == 1 )\r
+ #elif( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) /*lint !e731 Macro has been consolidated for readability reasons. */\r
{\r
/* The task could have been allocated statically or dynamically, so\r
check what was statically allocated before trying to free the\r
}\r
else\r
{\r
- pxCurrentTCB->ulNotifiedValue = ulReturn - 1;\r
+ pxCurrentTCB->ulNotifiedValue = ulReturn - ( uint32_t ) 1;\r
}\r
}\r
else\r
* Called after a Timer_t structure has been allocated either statically or\r
* dynamically to fill in the structure's members.\r
*/\r
-static void prvInitialiseNewTimer( const char * const pcTimerName,\r
+static void prvInitialiseNewTimer( const char * const pcTimerName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const TickType_t xTimerPeriodInTicks,\r
const UBaseType_t uxAutoReload,\r
void * const pvTimerID,\r
TimerCallbackFunction_t pxCallbackFunction,\r
- Timer_t *pxNewTimer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ Timer_t *pxNewTimer ) PRIVILEGED_FUNCTION;\r
/*-----------------------------------------------------------*/\r
\r
BaseType_t xTimerCreateTimerTask( void )\r
\r
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
\r
- TimerHandle_t xTimerCreate( const char * const pcTimerName,\r
+ TimerHandle_t xTimerCreate( const char * const pcTimerName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const TickType_t xTimerPeriodInTicks,\r
const UBaseType_t uxAutoReload,\r
void * const pvTimerID,\r
- TimerCallbackFunction_t pxCallbackFunction ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ TimerCallbackFunction_t pxCallbackFunction )\r
{\r
Timer_t *pxNewTimer;\r
\r
\r
#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
\r
- TimerHandle_t xTimerCreateStatic( const char * const pcTimerName,\r
+ TimerHandle_t xTimerCreateStatic( const char * const pcTimerName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const TickType_t xTimerPeriodInTicks,\r
const UBaseType_t uxAutoReload,\r
void * const pvTimerID,\r
TimerCallbackFunction_t pxCallbackFunction,\r
- StaticTimer_t *pxTimerBuffer ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ StaticTimer_t *pxTimerBuffer )\r
{\r
Timer_t *pxNewTimer;\r
\r
#endif /* configSUPPORT_STATIC_ALLOCATION */\r
/*-----------------------------------------------------------*/\r
\r
-static void prvInitialiseNewTimer( const char * const pcTimerName,\r
+static void prvInitialiseNewTimer( const char * const pcTimerName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
const TickType_t xTimerPeriodInTicks,\r
const UBaseType_t uxAutoReload,\r
void * const pvTimerID,\r
TimerCallbackFunction_t pxCallbackFunction,\r
- Timer_t *pxNewTimer ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ Timer_t *pxNewTimer )\r
{\r
/* 0 is not a valid value for xTimerPeriodInTicks. */\r
configASSERT( ( xTimerPeriodInTicks > 0 ) );\r
software timer. */\r
pxTimer = xMessage.u.xTimerParameters.pxTimer;\r
\r
- if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE )\r
+ if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) /*lint !e961. The cast is only redundant when NULL is passed into the macro. */\r
{\r
/* The timer is in a list, remove it. */\r
( void ) uxListRemove( &( pxTimer->xTimerListItem ) );\r
{\r
/* The timer queue is allocated statically in case\r
configSUPPORT_DYNAMIC_ALLOCATION is 0. */\r
- static StaticQueue_t xStaticTimerQueue;\r
- static uint8_t ucStaticTimerQueueStorage[ configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ];\r
+ static StaticQueue_t xStaticTimerQueue; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */\r
+ static uint8_t ucStaticTimerQueueStorage[ ( size_t ) configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ]; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */\r
\r
- xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue );\r
+ xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue );\r
}\r
#else\r
{\r
/* Checking to see if it is in the NULL list in effect checks to see if\r
it is referenced from either the current or the overflow timer lists in\r
one go, but the logic has to be reversed, hence the '!'. */\r
- xTimerIsInActiveList = ( BaseType_t ) !( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) );\r
+ xTimerIsInActiveList = ( BaseType_t ) !( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) ); /*lint !e961. Cast is only redundant when NULL is passed into the macro. */\r
}\r
taskEXIT_CRITICAL();\r
\r