Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How is it possible to stop a TSK created dynamically from execution?

0
Posted

How is it possible to stop a TSK created dynamically from execution?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123