\r
uxSavedInterruptState = portSET_INTERRUPT_MASK_FROM_ISR();\r
{\r
- /* If null is passed in here then we are changing the\r
- priority of the calling function. */\r
+ /* If null is passed in here then it is the priority of the calling\r
+ task that is being queried. */\r
pxTCB = prvGetTCBFromHandle( xTask );\r
uxReturn = pxTCB->uxPriority;\r
}\r
TickType_t xTicks;\r
\r
/* Critical section required if running on a 16 bit processor. */\r
- taskENTER_CRITICAL();\r
+ portTICK_TYPE_ENTER_CRITICAL();\r
{\r
xTicks = xTickCount;\r
}\r
- taskEXIT_CRITICAL();\r
+ portTICK_TYPE_EXIT_CRITICAL();\r
\r
return xTicks;\r
}\r
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */\r
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();\r
\r
- uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();\r
+ uxSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR();\r
{\r
xReturn = xTickCount;\r
}\r
- portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );\r
+ portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );\r
\r
return xReturn;\r
}\r
\r
/* Pad the end of the string with spaces to ensure columns line up when\r
printed out. */\r
- for( x = strlen( pcBuffer ); x < configMAX_TASK_NAME_LEN; x++ )\r
+ for( x = strlen( pcBuffer ); x < ( configMAX_TASK_NAME_LEN - 1 ); x++ )\r
{\r
pcBuffer[ x ] = ' ';\r
}\r
{\r
switch( pxTaskStatusArray[ x ].eCurrentState )\r
{\r
- case eReady: cStatus = tskREADY_CHAR;\r
- break;\r
+ case eReady: cStatus = tskREADY_CHAR;\r
+ break;\r
\r
- case eBlocked: cStatus = tskBLOCKED_CHAR;\r
- break;\r
+ case eBlocked: cStatus = tskBLOCKED_CHAR;\r
+ break;\r
\r
- case eSuspended: cStatus = tskSUSPENDED_CHAR;\r
- break;\r
+ case eSuspended: cStatus = tskSUSPENDED_CHAR;\r
+ break;\r
\r
- case eDeleted: cStatus = tskDELETED_CHAR;\r
- break;\r
+ case eDeleted: cStatus = tskDELETED_CHAR;\r
+ break;\r
\r
- default: /* Should not get here, but it is included\r
- to prevent static checking errors. */\r
- cStatus = 0x00;\r
- break;\r
+ default: /* Should not get here, but it is included\r
+ to prevent static checking errors. */\r
+ cStatus = 0x00;\r
+ break;\r
}\r
\r
/* Write the task name to the string, padding with spaces so it\r
ulTotalRunTimeDiv100 has already been divided by 100. */\r
ulStatsAsPercentage = pxTaskStatusArray[ x ].ulRunTimeCounter / ulTotalTime;\r
\r
+ /* Write the task name to the string, padding with\r
+ spaces so it can be printed in tabular form more\r
+ easily. */\r
+ pcWriteBuffer = prvWriteNameToBuffer( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName );\r
+\r
if( ulStatsAsPercentage > 0UL )\r
{\r
- /* Write the task name to the string, padding with\r
- spaces so it can be printed in tabular form more\r
- easily. */\r
- pcWriteBuffer = prvWriteNameToBuffer( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName );\r
-\r
#ifdef portLU_PRINTF_SPECIFIER_REQUIRED\r
{\r
sprintf( pcWriteBuffer, "\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].ulRunTimeCounter, ulStatsAsPercentage );\r
consumed less than 1% of the total run time. */\r
#ifdef portLU_PRINTF_SPECIFIER_REQUIRED\r
{\r
- sprintf( pcWriteBuffer, "%s\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter );\r
+ sprintf( pcWriteBuffer, "\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( pcWriteBuffer, "%s\t\t%u\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, ( unsigned int ) pxTaskStatusArray[ x ].ulRunTimeCounter );\r
+ sprintf( pcWriteBuffer, "\t\t%u\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, ( unsigned int ) pxTaskStatusArray[ x ].ulRunTimeCounter );\r
}\r
#endif\r
}\r