diff --git a/portable/MSVC-MingW/port.c b/portable/MSVC-MingW/port.c index d489746f57..66c9a53ea4 100644 --- a/portable/MSVC-MingW/port.c +++ b/portable/MSVC-MingW/port.c @@ -353,12 +353,12 @@ BaseType_t xPortStartScheduler( void ) pxThreadState = ( ThreadState_t * ) *( ( size_t * ) pxCurrentTCB ); ulCriticalNesting = portNO_CRITICAL_NESTING; - /* Start the first task. */ - ResumeThread( pxThreadState->pvThread ); - /* The scheduler is now running. */ xPortRunning = pdTRUE; + /* Start the first task. */ + ResumeThread( pxThreadState->pvThread ); + /* Handle all simulated interrupts - including yield requests and * simulated ticks. */ prvProcessSimulatedInterrupts();