diff --git a/portable/MSVC-MingW/port.c b/portable/MSVC-MingW/port.c index f78cc5d8d..8b8289b8f 100644 --- a/portable/MSVC-MingW/port.c +++ b/portable/MSVC-MingW/port.c @@ -332,12 +332,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();