}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
/* The task blocked to wait for its required bits to be set - at this\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
taskEXIT_CRITICAL();\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
else if( xTicksToWait == ( portTickType ) 0 )\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
if( xWaitForAllBits != pdFALSE )\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
/* Store the bits that the calling task is waiting for in the\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
/* The task blocked to wait for its required bits to be set - at this\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
taskEXIT_CRITICAL();\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
else if( ( uxBitsWaitedFor & pxEventBits->uxEventBits ) == uxBitsWaitedFor )\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
/* Store the actual event flag value in the task's event list\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
else\r
}\r
else\r
{\r
- mtBRANCH_TEST_INSTRUCTION();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
\r
#define configUSE_TRACE_FACILITY 0\r
#endif\r
\r
-#ifndef configBRANCH_TEST_INSTRUCTION\r
- #define configBRANCH_TEST_INSTRUCTION()\r
+#ifndef mtCOVERAGE_TEST_MARKER\r
+ #define mtCOVERAGE_TEST_MARKER()\r
#endif\r
\r
/* For backward compatability. */\r
{\r
pxList->pxIndex = pxItemToRemove->pxPrevious;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
pxItemToRemove->pvContainer = NULL;\r
( pxList->uxNumberOfItems )--;\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
\r
/*\r
- * A sample implementation of pvPortMalloc() and vPortFree() that combines \r
- * (coalescences) adjacent memory blocks as they are freed, and in so doing \r
+ * A sample implementation of pvPortMalloc() and vPortFree() that combines\r
+ * (coalescences) adjacent memory blocks as they are freed, and in so doing\r
* limits memory fragmentation.\r
*\r
- * See heap_1.c, heap_2.c and heap_3.c for alternative implementations, and the \r
+ * See heap_1.c, heap_2.c and heap_3.c for alternative implementations, and the\r
* memory management pages of http://www.FreeRTOS.org for more information.\r
*/\r
#include <stdlib.h>\r
/*-----------------------------------------------------------*/\r
\r
/*\r
- * Inserts a block of memory that is being freed into the correct position in \r
+ * Inserts a block of memory that is being freed into the correct position in\r
* the list of free memory blocks. The block being freed will be merged with\r
* the block in front it and/or the block behind it if the memory blocks are\r
* adjacent to each other.\r
static size_t xFreeBytesRemaining = ( ( size_t ) heapADJUSTED_HEAP_SIZE ) & ( ( size_t ) ~portBYTE_ALIGNMENT_MASK );\r
static size_t xMinimumEverFreeBytesRemaining = ( ( size_t ) heapADJUSTED_HEAP_SIZE ) & ( ( size_t ) ~portBYTE_ALIGNMENT_MASK );\r
\r
-/* Gets set to the top bit of an size_t type. When this bit in the xBlockSize \r
-member of an xBlockLink structure is set then the block belongs to the \r
+/* Gets set to the top bit of an size_t type. When this bit in the xBlockSize\r
+member of an xBlockLink structure is set then the block belongs to the\r
application. When the bit is free the block is still part of the free heap\r
space. */\r
static size_t xBlockAllocatedBit = 0;\r
{\r
prvHeapInit();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Check the requested block size is not so large that the top bit is\r
- set. The top bit of the block size member of the xBlockLink structure \r
+ set. The top bit of the block size member of the xBlockLink structure\r
is used to determine who owns the block - the application or the\r
kernel, so it must be free. */\r
if( ( xWantedSize & xBlockAllocatedBit ) == 0 )\r
{\r
xWantedSize += heapSTRUCT_SIZE;\r
\r
- /* Ensure that blocks are always aligned to the required number \r
+ /* Ensure that blocks are always aligned to the required number\r
of bytes. */\r
if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 )\r
{\r
/* Byte alignment required. */\r
xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) )\r
{\r
- /* Traverse the list from the start (lowest address) block until \r
+ /* Traverse the list from the start (lowest address) block until\r
one of adequate size is found. */\r
pxPreviousBlock = &xStart;\r
pxBlock = xStart.pxNextFreeBlock;\r
pxBlock = pxBlock->pxNextFreeBlock;\r
}\r
\r
- /* If the end marker was reached then a block of adequate size \r
+ /* If the end marker was reached then a block of adequate size\r
was not found. */\r
if( pxBlock != pxEnd )\r
{\r
- /* Return the memory space pointed to - jumping over the \r
+ /* Return the memory space pointed to - jumping over the\r
xBlockLink structure at its start. */\r
pvReturn = ( void * ) ( ( ( unsigned char * ) pxPreviousBlock->pxNextFreeBlock ) + heapSTRUCT_SIZE );\r
\r
- /* This block is being returned for use so must be taken out \r
+ /* This block is being returned for use so must be taken out\r
of the list of free blocks. */\r
pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;\r
\r
- /* If the block is larger than required it can be split into \r
+ /* If the block is larger than required it can be split into\r
two. */\r
if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE )\r
{\r
- /* This block is to be split into two. Create a new \r
- block following the number of bytes requested. The void \r
- cast is used to prevent byte alignment warnings from the \r
+ /* This block is to be split into two. Create a new\r
+ block following the number of bytes requested. The void\r
+ cast is used to prevent byte alignment warnings from the\r
compiler. */\r
pxNewBlockLink = ( void * ) ( ( ( unsigned char * ) pxBlock ) + xWantedSize );\r
\r
- /* Calculate the sizes of two blocks split from the \r
+ /* Calculate the sizes of two blocks split from the\r
single block. */\r
pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;\r
pxBlock->xBlockSize = xWantedSize;\r
/* Insert the new block into the list of free blocks. */\r
prvInsertBlockIntoFreeList( ( pxNewBlockLink ) );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
xFreeBytesRemaining -= pxBlock->xBlockSize;\r
\r
{\r
xMinimumEverFreeBytesRemaining = xFreeBytesRemaining;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* The block is being returned - it is allocated and owned\r
by the application and has no "next" block. */\r
pxBlock->xBlockSize |= xBlockAllocatedBit;\r
pxBlock->pxNextFreeBlock = NULL;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
traceMALLOC( pvReturn, xWantedSize );\r
extern void vApplicationMallocFailedHook( void );\r
vApplicationMallocFailedHook();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif\r
\r
/* Check the block is actually allocated. */\r
configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 );\r
configASSERT( pxLink->pxNextFreeBlock == NULL );\r
- \r
+\r
if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 )\r
{\r
if( pxLink->pxNextFreeBlock == NULL )\r
}\r
xTaskResumeAll();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
}\r
}\r
\r
/* Do the block being inserted, and the block it is being inserted after\r
- make a contiguous block of memory? */ \r
+ make a contiguous block of memory? */\r
puc = ( unsigned char * ) pxIterator;\r
if( ( puc + pxIterator->xBlockSize ) == ( unsigned char * ) pxBlockToInsert )\r
{\r
pxIterator->xBlockSize += pxBlockToInsert->xBlockSize;\r
pxBlockToInsert = pxIterator;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Do the block being inserted, and the block it is being inserted before\r
make a contiguous block of memory? */\r
}\r
else\r
{\r
- pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; \r
+ pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;\r
}\r
\r
/* If the block being inserted plugged a gab, so was merged with the block\r
{\r
pxIterator->pxNextFreeBlock = pxBlockToInsert;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
{\r
queueYIELD_IF_USING_PREEMPTION();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
else\r
vPortFree( pxNewQueue );\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
configASSERT( xReturn );\r
task that might be waiting to access the mutex. */\r
( void ) xQueueGenericSend( pxMutex, NULL, queueMUTEX_GIVE_BLOCK_TIME, queueSEND_TO_BACK );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
xReturn = pdPASS;\r
}\r
unblock. A context switch is required. */\r
queueYIELD_IF_USING_PREEMPTION();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
kernel takes care of that. */\r
queueYIELD_IF_USING_PREEMPTION();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
}\r
takes care of that. */\r
queueYIELD_IF_USING_PREEMPTION();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
#endif /* configUSE_QUEUE_SETS */\r
else\r
{\r
/* Entry time was already set. */\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
}\r
our own so yield immediately. */\r
portYIELD_WITHIN_API();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
taskEXIT_CRITICAL();\r
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );\r
portYIELD_WITHIN_API();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
priority inheritance should it become necessary. */\r
pxQueue->pxMutexHolder = ( signed char * ) xTaskGetCurrentTaskHandle();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif\r
\r
{\r
portYIELD_WITHIN_API();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
}\r
else\r
/* The task waiting has a higher priority than this task. */\r
portYIELD_WITHIN_API();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
-\r
}\r
\r
taskEXIT_CRITICAL();\r
}\r
taskEXIT_CRITICAL();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif\r
\r
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );\r
portYIELD_WITHIN_API();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
{\r
*pxHigherPriorityTaskWoken = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
else\r
{\r
*pxHigherPriorityTaskWoken = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
}\r
#else /* configUSE_QUEUE_SETS */\r
{\r
*pxHigherPriorityTaskWoken = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* configUSE_QUEUE_SETS */\r
}\r
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );\r
}\r
#endif\r
- \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
of execution time efficiency. */\r
priority inheritance should it become necessary. */\r
pxQueue->pxMutexHolder = ( signed char * ) xTaskGetCurrentTaskHandle(); /*lint !e961 Cast is not redundant as xTaskHandle is a typedef. */\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif\r
\r
{\r
queueYIELD_IF_USING_PREEMPTION();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
else\r
/* The task waiting has a higher priority than this task. */\r
queueYIELD_IF_USING_PREEMPTION();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
\r
else\r
{\r
/* Entry time was already set. */\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
}\r
}\r
taskEXIT_CRITICAL();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif\r
\r
{\r
portYIELD_WITHIN_API();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
{\r
*pxHigherPriorityTaskWoken = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
configASSERT( xQueue );\r
\r
taskENTER_CRITICAL();\r
+ {\r
uxReturn = ( ( xQUEUE * ) xQueue )->uxMessagesWaiting;\r
+ }\r
taskEXIT_CRITICAL();\r
\r
return uxReturn;\r
configASSERT( pxQueue );\r
\r
taskENTER_CRITICAL();\r
+ {\r
uxReturn = pxQueue->uxLength - pxQueue->uxMessagesWaiting;\r
+ }\r
taskEXIT_CRITICAL();\r
\r
return uxReturn;\r
vTaskPriorityDisinherit( ( void * ) pxQueue->pxMutexHolder );\r
pxQueue->pxMutexHolder = NULL;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* configUSE_MUTEXES */\r
}\r
{\r
pxQueue->pcWriteTo = pxQueue->pcHead;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
{\r
pxQueue->u.pcReadFrom = ( pxQueue->pcTail - pxQueue->uxItemSize );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
if( xPosition == queueOVERWRITE )\r
{\r
correct. */\r
--( pxQueue->uxMessagesWaiting );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
\r
{\r
pxQueue->u.pcReadFrom = pxQueue->pcHead;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. */\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
/*-----------------------------------------------------------*/\r
\r
A context switch is required. */\r
vTaskMissedYield();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
context switch is required. */\r
vTaskMissedYield();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
context switch is required. */\r
vTaskMissedYield();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
{\r
vTaskMissedYield();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
--( pxQueue->xRxLock );\r
}\r
that a yield might be appropriate. */\r
xReturn = errQUEUE_YIELD;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
else\r
return errQUEUE_FULL;\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
portENABLE_INTERRUPTS();\r
\r
{\r
pxQueue->u.pcReadFrom = pxQueue->pcHead;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
--( pxQueue->uxMessagesWaiting );\r
( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( unsigned ) pxQueue->uxItemSize );\r
\r
{\r
xReturn = errQUEUE_YIELD;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
else\r
{\r
return pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
return xCoRoutinePreviouslyWoken;\r
{\r
pxQueue->u.pcReadFrom = pxQueue->pcHead;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
--( pxQueue->uxMessagesWaiting );\r
( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( unsigned ) pxQueue->uxItemSize );\r
\r
{\r
*pxCoRoutineWoken = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
xReturn = pdPASS;\r
xQueueRegistry[ ux ].xHandle = xQueue;\r
break;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
}\r
\r
xQueueRegistry[ ux ].pcQueueName = NULL;\r
break;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
} /*lint !e818 xQueue could not be pointer to const because it is a typedef. */\r
/* There is nothing in the queue, block for the specified period. */\r
vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
prvUnlockQueue( pxQueue );\r
}\r
\r
/* The task waiting has a higher priority */\r
xReturn = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
return xReturn;\r
required.*/\r
*pxCreatedTask = ( xTaskHandle ) pxNewTCB;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Ensure interrupts don't access the task lists while they are being\r
updated. */\r
fails, but we will report the failure. */\r
prvInitialiseTaskLists();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
{\r
pxCurrentTCB = pxNewTCB;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
\r
{\r
taskYIELD_IF_USING_PREEMPTION();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
\r
{\r
taskRESET_READY_PRIORITY( pxTCB->uxPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Is the task waiting on an event also? */\r
if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )\r
{\r
( void ) uxListRemove( &( pxTCB->xEventListItem ) );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
vListInsertEnd( &xTasksWaitingTermination, &( pxTCB->xGenericListItem ) );\r
\r
{\r
xShouldDelay = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
{\r
xShouldDelay = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
/* Update the wake time ready for the next call. */\r
directly. */\r
portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
prvAddCurrentTaskToDelayedList( xTimeToWake );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
xAlreadyYielded = xTaskResumeAll();\r
\r
{\r
portYIELD_WITHIN_API();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
#endif /* INCLUDE_vTaskDelayUntil */\r
directly. */\r
portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
prvAddCurrentTaskToDelayedList( xTimeToWake );\r
}\r
xAlreadyYielded = xTaskResumeAll();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Force a reschedule if xTaskResumeAll has not already done so, we may\r
have put ourselves to sleep. */\r
{\r
portYIELD_WITHIN_API();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
#endif /* INCLUDE_vTaskDelay */\r
{\r
uxNewPriority = ( unsigned portBASE_TYPE ) configMAX_PRIORITIES - ( unsigned portBASE_TYPE ) 1U;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
taskENTER_CRITICAL();\r
{\r
{\r
xYieldRequired = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
else\r
{\r
{\r
pxTCB->uxPriority = uxNewPriority;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* The base priority gets set whatever. */\r
pxTCB->uxBasePriority = uxNewPriority;\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
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* If the task is in the blocked or suspended list we need do\r
nothing more than change it's priority variable. However, if\r
reset macro can be called directly. */\r
portRESET_READY_PRIORITY( uxPriorityUsedOnEntry, uxTopReadyPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
prvAddTaskToReadyList( pxTCB );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
if( xYieldRequired == pdTRUE )\r
{\r
taskYIELD_IF_USING_PREEMPTION();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Remove compiler warning about unused variables when the port\r
optimised task selection is not being used. */\r
{\r
taskRESET_READY_PRIORITY( pxTCB->uxPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Is the task waiting on an event also? */\r
if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )\r
{\r
( void ) uxListRemove( &( pxTCB->xEventListItem ) );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
vListInsertEnd( &xSuspendedTaskList, &( pxTCB->xGenericListItem ) );\r
}\r
task that is now in the Suspended state. */\r
prvResetNextTaskUnblockTime();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
}\r
\r
{\r
xReturn = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
return xReturn;\r
next yield. */\r
taskYIELD_IF_USING_PREEMPTION();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
taskEXIT_CRITICAL();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
#endif /* INCLUDE_vTaskSuspend */\r
{\r
xYieldRequired = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
( void ) uxListRemove( &( pxTCB->xGenericListItem ) );\r
prvAddTaskToReadyList( pxTCB );\r
vListInsertEnd( &( xPendingReadyList ), &( pxTCB->xEventListItem ) );\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );\r
\r
{\r
xReturn = xTimerCreateTimerTask();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* configUSE_TIMERS */\r
\r
{\r
xYieldPending = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
/* If any ticks occurred while the scheduler was suspended then\r
- they should be processed now. This ensures the tick count does \r
- not slip, and that any delayed tasks are resumed at the correct \r
+ they should be processed now. This ensures the tick count does\r
+ not slip, and that any delayed tasks are resumed at the correct\r
time. */\r
if( uxPendedTicks > ( unsigned portBASE_TYPE ) 0U )\r
{\r
{\r
xYieldPending = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
--uxPendedTicks;\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
if( xYieldPending == pdTRUE )\r
{\r
#endif\r
taskYIELD_IF_USING_PREEMPTION();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
taskEXIT_CRITICAL();\r
\r
}\r
#endif\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
( void ) xTaskResumeAll();\r
\r
{\r
taskSWITCH_DELAYED_LISTS();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* See if this tick has made a timeout expire. Tasks are stored in\r
the queue in the order of their wake time - meaning once one task\r
xNextTaskUnblockTime = xItemValue;\r
break;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* It is time to remove the item from the Blocked state. */\r
( void ) uxListRemove( &( pxTCB->xGenericListItem ) );\r
{\r
( void ) uxListRemove( &( pxTCB->xEventListItem ) );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Place the unblocked task into the appropriate ready\r
list. */\r
{\r
xSwitchRequired = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* configUSE_PREEMPTION */\r
}\r
{\r
xSwitchRequired = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* ( ( configUSE_PREEMPTION == 1 ) && ( configUSE_TIME_SLICING == 1 ) ) */\r
\r
{\r
vApplicationTickHook();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* configUSE_TICK_HOOK */\r
}\r
{\r
xSwitchRequired = pdTRUE;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* configUSE_PREEMPTION */\r
\r
/* Save the hook function in the TCB. A critical section is required as\r
the value can be accessed from an interrupt. */\r
taskENTER_CRITICAL();\r
+ {\r
xReturn = xTCB->pxTaskTag;\r
+ }\r
taskEXIT_CRITICAL();\r
\r
return xReturn;\r
{\r
pxCurrentTCB->ulRunTimeCounter += ( ulTotalRunTime - ulTaskSwitchedInTime );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
ulTaskSwitchedInTime = ulTotalRunTime;\r
}\r
#endif /* configGENERATE_RUN_TIME_STATS */\r
check, and the port reset macro can be called directly. */\r
portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
#if ( INCLUDE_vTaskSuspend == 1 )\r
{\r
check, and the port reset macro can be called directly. */\r
portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
#if ( INCLUDE_vTaskSuspend == 1 )\r
{\r
check, and the port reset macro can be called directly. */\r
portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Calculate the time at which the task should be woken if the event does\r
not occur. This may overflow but this doesn't matter. */\r
{\r
taskYIELD();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* ( ( configUSE_PREEMPTION == 1 ) && ( configIDLE_SHOULD_YIELD == 1 ) ) */\r
\r
portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime );\r
traceLOW_POWER_IDLE_END();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
( void ) xTaskResumeAll();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* configUSE_TICKLESS_IDLE */\r
}\r
{\r
eReturn = eNoTasksWaitingTimeout;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* configUSE_TIMERS */\r
}\r
{\r
break;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
/* Ensure the name string is terminated in the case that the string length\r
{\r
uxPriority = ( unsigned portBASE_TYPE ) configMAX_PRIORITIES - ( unsigned portBASE_TYPE ) 1U;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
pxTCB->uxPriority = uxPriority;\r
#if ( configUSE_MUTEXES == 1 )\r
\r
prvDeleteTCB( pxTCB );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
}\r
#endif /* vTaskDelete */\r
{\r
xNextTaskUnblockTime = xTimeToWake;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
}\r
/*-----------------------------------------------------------*/\r
\r
} while( pxNextTCB != pxFirstTCB );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
return uxTask;\r
}\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
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* If the task being modified is in the ready state it will need to\r
be moved into a new list. */\r
{\r
taskRESET_READY_PRIORITY( pxTCB->uxPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Inherit the priority before being moved into the new list. */\r
pxTCB->uxPriority = pxCurrentTCB->uxPriority;\r
\r
traceTASK_PRIORITY_INHERIT( pxTCB, pxCurrentTCB->uxPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
\r
{\r
taskRESET_READY_PRIORITY( pxTCB->uxPriority );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Disinherit the priority before adding the task into the new\r
ready list. */\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
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
prvAddTaskToReadyList( pxTCB );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
\r
{\r
( pxCurrentTCB->uxCriticalNesting )++;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
#endif /* portCRITICAL_NESTING_IN_TCB */\r
{\r
portENABLE_INTERRUPTS();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
#endif /* portCRITICAL_NESTING_IN_TCB */\r
/* Free the array again. */\r
vPortFree( pxTaskStatusArray );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
#endif /* ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS == 1 ) ) */\r
pcWriteBuffer += strlen( ( char * ) pcWriteBuffer );\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
/* Free the array again. */\r
vPortFree( pxTaskStatusArray );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
#endif /* ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS == 1 ) ) */\r
}\r
#endif\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
configASSERT( xReturn );\r
return xReturn;\r
\r
traceTIMER_COMMAND_SEND( xTimer, xCommandID, xOptionalValue, xReturn );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
return xReturn;\r
}\r
configASSERT( xResult );\r
( void ) xResult;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
\r
/* Call the timer callback. */\r
to block. */\r
portYIELD_WITHIN_API();\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
}\r
else\r
/* Call the function. */\r
pxCallback->pxCallbackFunction( pxCallback->pvParameter1, pxCallback->ulParameter2 );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* INCLUDE_xTimerPendCallbackFromISR */\r
\r
/* The timer is in a list, remove it. */\r
( void ) uxListRemove( &( pxTimer->xTimerListItem ) );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
\r
traceTIMER_COMMAND_RECEIVED( pxTimer, xMessage.xMessageID, xMessage.u.xTimerParameters.xMessageValue );\r
\r
configASSERT( xResult );\r
( void ) xResult;\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
break;\r
\r
( void ) xResult;\r
}\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
\r
pxTemp = pxCurrentTimerList;\r
{\r
vQueueAddToRegistry( xTimerQueue, ( signed char * ) "TmrQ" );\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
#endif /* configQUEUE_REGISTRY_SIZE */\r
}\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
}\r
taskEXIT_CRITICAL();\r
}\r