Structure visibility limitations

Having typedefs in the .c files rather than in the .h files makes things somewhat inconvenient. For instance, I would like to look into the tskTaskControlBlock structure for some realtime diagnostics of my own but because the structure is invisible I have to make a copy of it locally, which of course is dangerous if any future changes to the structure are made. Is this necessary because of the conditional compilation parameters?

Structure visibility limitations

This has been discussed a few times and the answer is always “the source code follows good engineering practice”. In a way you show the reason why in your question. Think of it in terms of a C++ class. There are the public definitions and the private definitions. The private definitions exist for a reason, one of which is to prevent users accessing the internal workings directly because the internal workings might change. So the private section prevents updates in the implementation of the C++ class breaking applications that make use of the class. FreeRTOS is not C++ but the principal is the same.
because the structure is invisible I have to make a copy of it locally, which of course is dangerous if any future changes to the structure are made
and if the structure was public and it changed that too would break your code so it makes no difference. Some people prefer it one way, the more academic engineers prefer it the other.

Structure visibility limitations

because the structure is invisible I have to make a copy of it locally, which of course is dangerous if any future changes to the structure are made “and if the structure was public and it changed that too would break your code so it makes no difference.” That’s not true if I am accessing elements in the structure that have not changed and I fully rebuild.  In most cases this would be the case as typically things would be added to the structure, not modified.