mirror of
				https://github.com/FreeRTOS/FreeRTOS-Kernel.git
				synced 2025-11-04 02:59:01 +01:00 
			
		
		
		
	Update xPortRunning before resuming first task (#1049)
The variable `xPortRunning` is now updated before starting the first task. It fixes the following issue - https://forums.freertos.org/t/possible-bug-in-the-way-prvtimertask-thread-function-is-started-in-win32-port/19959/ Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
		
							parent
							
								
									2eb2d653bf
								
							
						
					
					
						commit
						78c8bbde0e
					
				@ -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();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user