FreeRTOS / FreeRTOS-Kernel

FreeRTOS kernel files only, submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos.
https://www.FreeRTOS.org
MIT License
2.71k stars 1.11k forks source link

[DOC] xQueueOverwrite Queue Length #1063

Closed schilkp closed 3 months ago

schilkp commented 4 months ago

Describe the issue

The documentation for xQueueOverwrite states:

xQueueOverwrite() is intended for use with queues that have a length of one, 
meaning the queue is either empty or full.

xQueueOverwrite calls xQueueGenericSend:

#define xQueueOverwrite( xQueue, pvItemToQueue ) \
    xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), 0, queueOVERWRITE )

xQueueGenericSend features the following assertion:

configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );

This means that either:

Reference https://www.freertos.org/xQueueOverwrite.html

Browser

Thanks!

kar-rahul-aws commented 4 months ago

Hi @schilkp Thank you for reporting the issue. We will fix the documentation and update.

kar-rahul-aws commented 3 months ago

Hi @schilkp It has been updated in the website. Closing the issue.