Remove post-timeout re-check in queue receive paths#1408
Open
AniruddhaKanhere wants to merge 1 commit intoFreeRTOS:mainfrom
Open
Remove post-timeout re-check in queue receive paths#1408AniruddhaKanhere wants to merge 1 commit intoFreeRTOS:mainfrom
AniruddhaKanhere wants to merge 1 commit intoFreeRTOS:mainfrom
Conversation
xQueueReceive, xQueueSemaphoreTake, and xQueuePeek re-checked the queue state after timeout expiry and looped back if data had arrived, while xQueueGenericSend returned errQUEUE_FULL directly on timeout. Remove the post-timeout re-check from all three receive-side functions to make timeout behavior symmetric with the send path. Once the timeout has expired, return errQUEUE_EMPTY directly. For xQueueSemaphoreTake, the mutex priority disinheritance logic is retained and now runs unconditionally on timeout. Refs FreeRTOS/FreeRTOS#65 Forum: https://forums.freertos.org/t/xqueuegenericsend-and-xqueuereceive/24856
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



xQueueReceive, xQueueSemaphoreTake, and xQueuePeek re-checked the queue state after timeout expiry and looped back if data had arrived, while xQueueGenericSend returned errQUEUE_FULL directly on timeout.
Remove the post-timeout re-check from all three receive-side functions to make timeout behavior symmetric with the send path. Once the timeout has expired, return errQUEUE_EMPTY directly.
For xQueueSemaphoreTake, the mutex priority disinheritance logic is retained and now runs unconditionally on timeout.
Refs FreeRTOS/FreeRTOS#65 Forum: https://forums.freertos.org/t/xqueuegenericsend-and-xqueuereceive/24856
Description
Test Steps
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.