Fix POSIX port to respect configUSE_TIME_SLICING (#1103)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
pull/1104/head
Gaurav-Aggarwal-AWS 6 months ago committed by GitHub
parent 5588ae68c8
commit d844312131
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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--;
}

Loading…
Cancel
Save