Hi,
Thanks for answering...But even if those copies are put into a queue, does that mean they run sequentially one after another without being interrupted in between like:
...
copy1 done;
copy2 done;
...something else outside that functionF runs..;
copy3;
cop4;
....
a fucntion is not guaranteed unpre-empted, isn't it?
On 3/15/06, Michael Schippling <[EMAIL PROTECTED]> wrote:
That will put X copies of the task on the exec queue
and they will then be run sequentially. Note however
that the task queue is not very large so you may blow
it out if you post to many. Phil Levis beat the queue
mechanism to death in some recent messages about task
scheduling. I don't remember the actual length.
MS
Tran Trong Tri wrote:
> Hi,
>
> I have one question about task and function....I understand that a task
> will not be interrupted by another task and hence executes until
> completion...Suppose I want to run a task a few times consecutively
> within a functionlike below
>
> uint8_t g;
>
> task void taskT()
> { .../*This task does something on a global variable "g"...}
>
>
> void fucntion(uint8_t * x)
> {
> for(i=0;i<*x;i++)
> post taskT();
> }
>
> I want to this task to run *x times uninterrupted....Can somebody advise
> if what I have done like above is safe and if not, any suggestion?...The
> function will be called under some "event"...and I cannot put taskT ( )
> in another task so that it can run x times uninterrupted as the number
> of times "x" is a neccesary parameter...
>
> Thanks for helping...
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
