How is it possible to stop a TSK created dynamically from execution?
When the TSK_create API is called from the application, make sure that the priority of the task is set to a negative value in the TSK_Attrs structure. This will make sure that the newly created task will not run. At a later stage when the task needs to be run, raise the priority of the task to a value greater than 0 by using the TSK_setpri API call. By doing so, one can control the execution of a newly created task. The task in execution can be temporarily suspended and made to context switch by setting a negative priority. At a later stage, by reverting the priority from a different thread, one can continue the execution of the stalled task.