On 8/13/07, Hugo Sousa <[EMAIL PROTECTED]> wrote:
> I don't know about that, but you can find out if you make a component
> that implements two interfaces and commands that manipulate the same
> variable (initially set to 0). For example have one command set the
> variable to 2 and have the other command divide the variable by 2, and
> on both commands set that value to the leds. You'll know which command
> was called first according to the value set in the leds.

The order is unspecified. In other words, it might change:
- between two compilations
- between two platforms
- between two different versions of the compiler

The first one is unlikely, the last one is quite possible.

Or, in summary, "don't depend on the order of execution for
multiply-wired commands and events".

David Gay

> On 8/13/07, Min Guo <[EMAIL PROTECTED]> wrote:
> > Thanks Hugo, you are right. By the way, if there is a fan-out call to
> > several commands, do you know in what order will the commands be
> > executed? (which one is executed first, and why) Does that depend on
> > the sequence of the component wirings?
> >
> > On 8/13/07, Hugo Sousa <[EMAIL PROTECTED]> wrote:
> > > By wiring twice you are saying that the functions provided by the
> > > interface Leds are also called twice. BlinkC calls the leds to toggle,
> > > and two back-to-back toggles makes the led stay the same (at least for
> > > our eyes).
> > >
> > > Hugo
> _______________________________________________
> 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

Reply via email to