In taskA I would like to know if taskB is created. taskB is a one-shot task (runs and deletes itself). If it is not running, taskA will create the task.
Is there a function call that delivers this information?
thanks!
How to tell if a particular task is created ?
How to tell if a particular task is created ?
To my knowledge there’s no specific function for that purpose. But since this is just another case of intertask-communication you could use queues, semaphores or shared memory. Just have a global variable that’s set and cleared by task B upon creation and deletion and checked by Task A.
Have you considered suspending task B instead of deleting it – that should have much better performance.
How to tell if a particular task is created ?
Or if the task never enters the blocked state, replacing it with a software timer.
How to tell if a particular task is created ?
didn’t think about the suspend idea, hmmmm….. I think that is a great idea! I was using a global variable. this seems much cleaner.
thanks!
How to tell if a particular task is created ?
…if another tasks still needs to know its state, you can then use the xTaskIsTaskSuspended( xTaskHandle xTask ) API function.
Regards.