mirror of
				https://github.com/FreeRTOS/FreeRTOS-Kernel.git
				synced 2025-11-04 11:09:01 +01:00 
			
		
		
		
	Removed the 'configASSERT( xInheritanceOccurred == pdFALSE )' assertion from xQueueSemaphoreTake as the reasoning behind it is wrong; it can trigger on wrongly on highly-contested semaphores on multicore systems. See https://forums.freertos.org/t/15967 (#576)
Co-authored-by: Niklas Gürtler <niklas.guertler@tacterion.com>
This commit is contained in:
		
							parent
							
								
									1d20f0eba2
								
							
						
					
					
						commit
						4e2bf2c639
					
				
							
								
								
									
										9
									
								
								queue.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								queue.c
									
									
									
									
									
								
							@ -1604,15 +1604,6 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue,
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                if( xTicksToWait == ( TickType_t ) 0 )
 | 
					                if( xTicksToWait == ( TickType_t ) 0 )
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    /* For inheritance to have occurred there must have been an
 | 
					 | 
				
			||||||
                     * initial timeout, and an adjusted timeout cannot become 0, as
 | 
					 | 
				
			||||||
                     * if it were 0 the function would have exited. */
 | 
					 | 
				
			||||||
                    #if ( configUSE_MUTEXES == 1 )
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        configASSERT( xInheritanceOccurred == pdFALSE );
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    #endif /* configUSE_MUTEXES */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    /* The semaphore count was 0 and no block time is specified
 | 
					                    /* The semaphore count was 0 and no block time is specified
 | 
				
			||||||
                     * (or the block time has expired) so exit now. */
 | 
					                     * (or the block time has expired) so exit now. */
 | 
				
			||||||
                    taskEXIT_CRITICAL();
 | 
					                    taskEXIT_CRITICAL();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user