Skip to content

Commit 4497b5e

Browse files
Erlkoenig90chinglee-iot
authored andcommitted
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 (FreeRTOS#576)
Co-authored-by: Niklas Gürtler <[email protected]>
1 parent d6f4fa1 commit 4497b5e

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

queue.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,15 +1624,6 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue,
16241624
{
16251625
if( xTicksToWait == ( TickType_t ) 0 )
16261626
{
1627-
/* For inheritance to have occurred there must have been an
1628-
* initial timeout, and an adjusted timeout cannot become 0, as
1629-
* if it were 0 the function would have exited. */
1630-
#if ( configUSE_MUTEXES == 1 )
1631-
{
1632-
configASSERT( xInheritanceOccurred == pdFALSE );
1633-
}
1634-
#endif /* configUSE_MUTEXES */
1635-
16361627
/* The semaphore count was 0 and no block time is specified
16371628
* (or the block time has expired) so exit now. */
16381629
taskEXIT_CRITICAL();

0 commit comments

Comments
 (0)