QueueReceive max timeout

Greetings.

The online documentation for xQueueReceive ( Documentation/02-Kernel/04-API-references/06-Queues/09-xQueueReceive ) says:

“If INCLUDE_vTaskSuspend is set to ‘1’ then specifying the block time as portMAX_DELAY will cause the task to block indefinitely (without a timeout).”

But the queue.h documentation in my clone of FreeRTOS-Kernel from github makes of this. I checked both V11.1.0 and origin/main and neither mention that the function can block indefinitely.

Peeking into the code, I think the support to block indefinitely has been there a long time, so I’m wondering about the documentation discrepancy.

It’s an omission in the code comments. The entire FreeRTOS API is pretty consistent about the behavior of portMAX_DELAY as the xTicksToWait parameter. With INCLUDE_vTaskSuspendset to 1, the blocking has no timeout.