FreeRTOS-Kernel
FreeRTOS-Kernel copied to clipboard
Allow for thread naming in Posix port
Hello,
We love the Posix port! This allows us to run our embedded application from the Linux command line. It would be nice if we could see the individual thread names.
This could easily go here by calling pthread_setname_np(): https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/195a351ec797ba434c0e00fbba1d1f6adb74e279/portable/ThirdParty/GCC/Posix/port.c#L159 the problem is that pxPortInitialiseStack does not know pxNewTCB->pcTaskName.
I can't think of a clean way to do this without changing the arguments to pxPortInitialiseStack(). And that seems problematic.
Any thoughts?
Hello @pthomas,
Unfortunately we cannot use non portable functions as we compile and run the port on MacOS as well, and xxx_np functions won't work there. also changing the function signature of pvParameters just for the POSIX port is not feasible, as it will be the only port using it.