panj wrote on Wednesday, July 04, 2007:

I have created two task. first task i want to delete from second task’s entry function. but i m not able to delete it.

What can be the reasons?

embeddedc wrote on Wednesday, July 04, 2007:

What did you try doing?  How do you know its not deleted?

Are you letting the idle task get some processing time?

panj wrote on Thursday, July 05, 2007:

I varified from task list that it is still alive. why idle task should get CPU time?

pdeflandre wrote on Thursday, July 05, 2007:

This is what we can read from the FreeRTOS API vTaskDelete page :

NOTE: The idle task is responsible for freeing the kernel allocated memory from tasks that have been deleted. It is therefore important that the idle task is not starved of microcontroller processing time if your application makes any calls to vTaskDelete (). Memory allocated by the task code is not automatically freed, and should be freed before the task is deleted.

See the demo application file death. c for sample code that utilises vTaskDelete ().