FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\r
- more details. You should have received a copy of the GNU General Public \r
- License and the FreeRTOS license exception along with FreeRTOS; if not it \r
- can be viewed here: http://www.freertos.org/a00114.html and also obtained \r
+ more details. You should have received a copy of the GNU General Public\r
+ License and the FreeRTOS license exception along with FreeRTOS; if not it\r
+ can be viewed here: http://www.freertos.org/a00114.html and also obtained\r
by writing to Richard Barry, contact details for whom are available on the\r
FreeRTOS WEB site.\r
\r
#endif\r
\r
#ifndef traceBLOCKING_ON_QUEUE_RECEIVE\r
- /* Task is about to block because it cannot read from a \r
+ /* Task is about to block because it cannot read from a\r
queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore\r
- upon which the read was attempted. pxCurrentTCB points to the TCB of the \r
+ upon which the read was attempted. pxCurrentTCB points to the TCB of the\r
task that attempted the read. */\r
#define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )\r
#endif\r
\r
#ifndef traceBLOCKING_ON_QUEUE_SEND\r
- /* Task is about to block because it cannot write to a \r
+ /* Task is about to block because it cannot write to a\r
queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore\r
- upon which the write was attempted. pxCurrentTCB points to the TCB of the \r
+ upon which the write was attempted. pxCurrentTCB points to the TCB of the\r
task that attempted the write. */\r
#define traceBLOCKING_ON_QUEUE_SEND( pxQueue )\r
#endif\r
#endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */\r
\r
#ifndef portGET_RUN_TIME_COUNTER_VALUE\r
- #error If configGENERATE_RUN_TIME_STATS is defined then portGET_RUN_TIME_COUNTER_VALUE must also be defined. portGET_RUN_TIME_COUNTER_VALUE should evaluate to the counter value of the timer/counter peripheral used as the run time counter time base.\r
+ #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE\r
+ #error If configGENERATE_RUN_TIME_STATS is defined then either portGET_RUN_TIME_COUNTER_VALUE or portALT_GET_RUN_TIME_COUNTER_VALUE must also be defined. See the examples provided and the FreeRTOS web site for more information.\r
+ #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */\r
#endif /* portGET_RUN_TIME_COUNTER_VALUE */\r
\r
#endif /* configGENERATE_RUN_TIME_STATS */\r
unsigned portBASE_TYPE uxQueue;\r
unsigned long ulTotalRunTime;\r
\r
- /* A critical section is used because portGET_RUN_TIME_COUNTER_VALUE()\r
- is implemented differently on different ports, so its not known if a\r
- critical section is needed or not. */\r
- taskENTER_CRITICAL();\r
- {\r
- ulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();\r
- }\r
- taskEXIT_CRITICAL();\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
\r
vTaskSuspendAll();\r
{\r
+ #ifdef portALT_GET_RUN_TIME_COUNTER_VALUE\r
+ portALT_GET_RUN_TIME_COUNTER_VALUE( ulTotalRunTime );\r
+ #else\r
+ ulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();\r
+ #endif\r
+\r
/* Run through all the lists that could potentially contain a TCB,\r
generating a table of run timer percentages in the provided\r
buffer. */\r
\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
{\r
- unsigned long ulTempCounter = portGET_RUN_TIME_COUNTER_VALUE();\r
+ unsigned long ulTempCounter;\r
+ \r
+ #ifdef portALT_GET_RUN_TIME_COUNTER_VALUE\r
+ portALT_GET_RUN_TIME_COUNTER_VALUE( ulTempCounter );\r
+ #else\r
+ ulTempCounter = portGET_RUN_TIME_COUNTER_VALUE();\r
+ #endif\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