rtel wrote on Monday, May 15, 2006:
Hmm, I don’t want to sit on the fence too much, but I don’t really see it as a big issue. It is just an implementation choice.
Placing a jump to a delete function on the return stack is valid and neat, but does require more stack (albeit a few bytes, remember FreeRTOS runs on some tiny processors). I don’t see how this gets around having most tasks as an infinite loop however.
The current implementation will allow users to crash the code by running off the bottom of a task. Doing so would show a lack of understanding of the system they were programming so I doubt this would be their only problem ;-) There are lots of ways you can cause a crash, and as a small fast implementation FreeRTOS does not try to guard against them all. Placing a vTaskDelete call outside of the loop is not a big issue, and more explicit of how you intend the task to function.
So I don’t have strong feelings either way. FreeRTOS provides all the source code so you can make your application function however you wish by editing if you so desire.