I am using FreeRTOS 10.3.1 but happy to upgrade to a later version if it helps. For diagnostic purposes, my application includes a facility to list all the running tasks with their states, and list all mutexes and their owners. However, the information provided by vTaskGetInfo isn’t adequate. In particular, if a task is not running or ready, it is always reported as “blocked”. What I need to know is whether it is waiting to be notified, or waiting on a mutex, or delaying; and if it is waiting on a mutex, the address of that mutex (from which I can get its identity, because we derive our own C++ Mutex class from StaticSemaphore_t).
Before I add an additional API function to FreeRTOS, are there any existing API functions I have missed that can provide some or all of this information?
One simple improvement that I think could be made is for vTaskGetInfo to return a new status value instead of “blocked” if the ucNotifyState field of the task being queried is taskWAITING_NOTIFICATION.