Since the current vTaskDelete is only called when the Idle Task is running, I encounter some cases when my system is too busy to let the idle task run & do the clean-up. Currently I’m trying not to create/delete tasks too many times, but still hoping to add a way to handle it when it happens. I’m considering to add another call to vTaskDelete from xTaskGenericCreate. In this way, when the idle task have a chance to run, it still going to delete the task waiting for termination. But when the idle task has no chance, the next task create will do the actual clean-up. Any thoughts on this? Thanks.
Ok. Any specific reason why the deletion should be done after the memory is allocated for the new task? Because if the system has a very limited memory, it might be useful to do clean-up before any allocation. Thanks again.
It does not have to be - that is just where the trace macro I suggested defining is called from. Doing what you want using a trace macro just prevents you from having to edit the source files.
In general terms, limited memory system should build static task. Ie: never delete a task.
~~ _/) _/) _/) ``` _/) ~~
Sent from my Phone
On Mar 30, 2014, at 8:37 PM, “Real Time Engineers ltd.” rtel@users.sf.net wrote:
It does not have to be - that is just where the trace macro I suggested defining is called from. Doing what you want using a trace macro just prevents you from having to edit the source files.