Page 1 of 1

Start a task at a specific location

PostPosted: Mon Jun 26, 2006 6:57 am
by Darukur
I have a task with multiple labels and I want to know if it´s possible to start the task in a certain label inside the task.

Thanks in advance

------------------
the one that does not know what looks for does not understand what finds


Re: Start a task at a specific location

PostPosted: Mon Jun 26, 2006 7:08 am
by Darukur
It´s possible to use it like this?

OSCreateTask(label to position,pointer,prio);

were "label to position" is the specific location on the task


Re: Start a task at a specific location

PostPosted: Mon Jun 26, 2006 11:04 am
by Darukur
In order to work the last note I had to destroy the task and recreate it with the desired starting point.
Is this a correct thing to do?

Re: Start a task at a specific location

PostPosted: Tue Jun 27, 2006 7:17 am
by aek
Hmmm ... IIRC the current release (3.2.4 and higher) of Salvo allows you to re-create a task via OSCreateTask() without first destroying it ... check OSCreateTask()'s return code. Destroying it first is much safer. If the task is already waiting an event, then this won't work.

But yes, since Salvo tasks are void taskName (void), you should be able to "initially enter" the task just about anywhere. I haven't tried it, but I don't see why it wouldn't work. I'd recommend testing it thoroughly, though.

------------------


Re: Start a task at a specific location

PostPosted: Tue Jun 27, 2006 10:09 am
by Darukur
Thanks for your quick response.

Re: Start a task at a specific location

PostPosted: Wed Jun 28, 2006 5:34 am
by Darukur
In order to destroy the task...
Do I have to wait for the task to change its state to another than WAITING or I can force it to another state?
Maybe with "OSStopTask"?

Re: Start a task at a specific location

PostPosted: Wed Jun 28, 2006 10:14 am
by aek
Send an email to support and we'll send you the code for a function that will unconditionally kill a task, no matter what's state it's in.

------------------


Re: Start a task at a specific location

PostPosted: Thu Jun 29, 2006 5:36 am
by Darukur
I sent the email to info@pumpkininc.com

thanks.