How to stop a task

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
sergifern
Newbie
Posts: 11
Joined: Thu Sep 23, 2010 1:13 pm

How to stop a task

Post by sergifern » Sun Dec 05, 2010 8:11 pm

Hi!
I have a problem to stop a task. When I have a task on (with SetRelAlarm), I would like to stop and then Set on again but with a different period. I have found TerminateTask() function, but the compiler says that the function is not declared. I should add some other library? There is another function to do what I want?

Thanks,
Sergi

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: How to stop a task

Post by paolo.gai » Mon Dec 06, 2010 9:10 am

If you specified the period using SetRelAlarm, and you want to change period, you should first cancel the alarm using CancelAlarm, and then set again a new period using SetRelAlarm.

If you want to kill the running task, you can use TerminateTask. (but note that TerminateTask is NOT available under FP, EDF, FRSK kernels!).

Ciao,

PJ

Post Reply