NOTE:This is a read only archive of threads posted to the FreeRTOS support forum. Use these archive pages to search previous posts. New forum support threads can be started at the FreeRTOS forums.
FreeRTOS Support Archive
The FreeRTOS support forum can be used for active support both from Amazon Web Services and the community. In return for using our software for free, we request you play fair and do your bit to help others! Sign up for an account and receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum. Use these archive pages to search previous posts. New forum support threads can be started at the FreeRTOS forums.
I’m using FreeRTOS with an ATMega1280 based project. I’m trying to optimise heap and stack usage as the device is fairly memory constrained.
So I’m making use of uxTaskGetStackHighWaterMark(xTaskHandle). I don’t really want to use more RAM to store the task names, but it would be helpful to log the names rather than the handle IDs. The names are in the TCB of course but I can’t see a function to retrieve them.
Could somebody point me to a function, if it exists, or is there an architectural reason that one couldn’t/shouldn’t be added?
Thanks for the response.
I had put something similar in place, but using (const char *) for the return.
My question was more to do with why the there are no accessor functions in place already in FreeRTOS as this seems a sensible idea. I wondered if there is an architectural reason not to expose fields of the TCBs in this way…
All the kernel data structures use data hiding in this way. Inside the files that define the structures the structure members are fully visible. Outside the files the structures are defined as void* to keep their members hidden – and access can only be obtained through access functions.
There is no particular reason why a function to return the name has never been included. I have added it to the todo list so it will be there in the next release.