|
|
|
@ -420,36 +420,19 @@ static void vPortSystemTickHandler( int sig )
|
|
|
|
|
|
|
|
|
|
( void ) sig;
|
|
|
|
|
|
|
|
|
|
/* uint64_t xExpectedTicks; */
|
|
|
|
|
|
|
|
|
|
uxCriticalNesting++; /* Signals are blocked in this signal handler. */
|
|
|
|
|
|
|
|
|
|
#if ( configUSE_PREEMPTION == 1 )
|
|
|
|
|
pxThreadToSuspend = prvGetThreadFromTask( xTaskGetCurrentTaskHandle() );
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Tick Increment, accounting for any lost signals or drift in
|
|
|
|
|
* the timer. */
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Comment code to adjust timing according to full demo requirements
|
|
|
|
|
* xExpectedTicks = (prvGetTimeNs() - prvStartTimeNs)
|
|
|
|
|
* / (portTICK_RATE_MICROSECONDS * 1000);
|
|
|
|
|
* do { */
|
|
|
|
|
xTaskIncrementTick();
|
|
|
|
|
|
|
|
|
|
/* prvTickCount++;
|
|
|
|
|
* } while (prvTickCount < xExpectedTicks);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#if ( configUSE_PREEMPTION == 1 )
|
|
|
|
|
if( xTaskIncrementTick() != pdFALSE )
|
|
|
|
|
{
|
|
|
|
|
/* Select Next Task. */
|
|
|
|
|
vTaskSwitchContext();
|
|
|
|
|
|
|
|
|
|
pxThreadToResume = prvGetThreadFromTask( xTaskGetCurrentTaskHandle() );
|
|
|
|
|
|
|
|
|
|
prvSwitchThread( pxThreadToResume, pxThreadToSuspend );
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uxCriticalNesting--;
|
|
|
|
|
}
|
|
|
|
|