mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-19 11:17:43 -04:00
First task running in RISC-V-Qemu-sifive_e-FreedomStudio demo.
This commit is contained in:
parent
d0ef322b13
commit
dc99300fa9
11 changed files with 422 additions and 277 deletions
|
@ -2937,28 +2937,28 @@ void vTaskSwitchContext( void )
|
|||
|
||||
#if ( configGENERATE_RUN_TIME_STATS == 1 )
|
||||
{
|
||||
#ifdef portALT_GET_RUN_TIME_COUNTER_VALUE
|
||||
portALT_GET_RUN_TIME_COUNTER_VALUE( ulTotalRunTime );
|
||||
#else
|
||||
ulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();
|
||||
#endif
|
||||
#ifdef portALT_GET_RUN_TIME_COUNTER_VALUE
|
||||
portALT_GET_RUN_TIME_COUNTER_VALUE( ulTotalRunTime );
|
||||
#else
|
||||
ulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();
|
||||
#endif
|
||||
|
||||
/* Add the amount of time the task has been running to the
|
||||
accumulated time so far. The time the task started running was
|
||||
stored in ulTaskSwitchedInTime. Note that there is no overflow
|
||||
protection here so count values are only valid until the timer
|
||||
overflows. The guard against negative values is to protect
|
||||
against suspect run time stat counter implementations - which
|
||||
are provided by the application, not the kernel. */
|
||||
if( ulTotalRunTime > ulTaskSwitchedInTime )
|
||||
{
|
||||
pxCurrentTCB->ulRunTimeCounter += ( ulTotalRunTime - ulTaskSwitchedInTime );
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
ulTaskSwitchedInTime = ulTotalRunTime;
|
||||
/* Add the amount of time the task has been running to the
|
||||
accumulated time so far. The time the task started running was
|
||||
stored in ulTaskSwitchedInTime. Note that there is no overflow
|
||||
protection here so count values are only valid until the timer
|
||||
overflows. The guard against negative values is to protect
|
||||
against suspect run time stat counter implementations - which
|
||||
are provided by the application, not the kernel. */
|
||||
if( ulTotalRunTime > ulTaskSwitchedInTime )
|
||||
{
|
||||
pxCurrentTCB->ulRunTimeCounter += ( ulTotalRunTime - ulTaskSwitchedInTime );
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
ulTaskSwitchedInTime = ulTotalRunTime;
|
||||
}
|
||||
#endif /* configGENERATE_RUN_TIME_STATS */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue