Incorrect/misleading comment in queue.h

I am looking at queue.h source code in kernel 11.0.1 lines 154 onwards. The comment is about functions xQueueTakeMutexRecursive and xQueueGiveMutexRecursive. It reads:

/*

  • For internal use only. Use xSemaphoreTakeMutexRecursive() or
  • xSemaphoreGiveMutexRecursive() instead of calling these functions directly.
    */

However, I don’t find xSemaphoreTakeMutexRecursive or xSemaphoreGiveMutexRecursive defined anywhere, nor are they mentioned in the API documentation. Should they read xSemaphoreTakeRecursive and xSemaphoreGiveRecursive instead?

Yes - just looked at this and think you are right - the comment should say to use xSemaphoreTakeRecursive() as that can be used with any semaphore type. It is also what the xSemaphoreCreateRecursive() documentation says to do. Thanks for taking the time to report.

Hello @dc42,

Thank you for taking the time to report this to us. This PR fixes this: Fix documentation for xQueueTakeMutexRecursive by ericbj29 · Pull Request #943 · FreeRTOS/FreeRTOS-Kernel · GitHub. It has been merged!

Thanks again,
Aniruddha

Thanks for the quick response!