Actually, if both of them use post, the second post can't be performed
(because you can't post the same task twice). So only one of them wil
execute.

Arik


2010/2/26 Javier Puiggros Vogel <[email protected]>

> I think it depends on the implementation. If there is any post in the
> interface you are right and both DoSomething may use the same argument. If
> there is no post each one will use their own.
>
> Regards
>
> Javier
>
> El vie, 26-02-2010 a las 15:23 +0200, Arik Sapojnik escribió:
>
> Thanks Mark,
>
> So basically you think that interfaces are blocking.
> Anyone can approve? :)
>
> Arik
>
>
>
> On Fri, Feb 26, 2010 at 14:42, Mark Proctor <[email protected]>
> wrote:
>
>
> I am probably wrong (and hopefully someone will correct me) but as far as I
> understand it.
>
>  I think all code continues to run in sequence across interfaces until it
> ends.  If a new task is posted it wont run until the current task has
> completed .
>
>  so in your example below DoSomething(10) will run then DoSomething(20)
> but what they do with it if a new task is posted wont
>
>
>
>  e.g
>
>  event void MyInterface.DoSomething(int n)
>
>  { dbg("n is %i",n);
>
>    c=n;
>
>    post someTask();
>
>  }
>
>  task void someTask()
>
>  { dbg("c is %i",c);
>
>  }
>
>
>
>  you will get out:
>
>  n is 10
>
>  n is 20
>
>  ...
>
>  c is 20
>
>
>
>  ------------------------------
>
> From: [email protected]
> Date: Fri, 26 Feb 2010 12:42:54 +0200
> To: [email protected]
> CC: [email protected]
> Subject: Re: [Tinyos-help] Is a new interface created as a split-phase
>
>
>
>
>  Hmm... That makes sense.
> But how can I know whether this is a split-phase or a blocking interface?
> Because if I need something like this:
>
> external int var;
> event void Boot.booted(){
>    var = 10;
>    call MyInterface.DoSomething(var);
>
>    var = 20;
>    call MyInterface.DoSomething(var);
>    ...
> }
>
> Will it copy the correct values or use var=20 in both cases?
> Actually I don't know the answer regarding the Timer interface either...
>
> Arik
>
>
>
>
>  On Fri, Feb 26, 2010 at 10:59, AKHILA S RAO <[email protected]>
> wrote:
>
> just as you can do
> event Boot.booted()
> { call Timer.startOneShot(55);
>  call Timer.startOneShot(66);
> }
>
> i think you can do what you mentioned as well
>
>
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
>
>
> --
> Best Regards,
> Arik Sapojnik
>
>
> ------------------------------
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
>
>
> --
> Best Regards,
> Arik Sapojnik
>
> _______________________________________________
> Tinyos-help mailing 
> [email protected]https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
>
> Javier Puiggros V.
> Gerente I+D
> Ingeniería Wiseconn S.A.
> +56 9 98241648
> +56 2 6562822
> 12 Norte 860, Viña del Mar
> ------------------------------
>
> *Confidencialidad*: La información contenida y el presente mensaje son
> confidenciales y para el uso exclusivo de la persona o entidad destinataria.
> Se prohíbe cualquier tipo de reproducción, divulgación o distribución que no
> haya sido autorizado previamente por WiseConn quien, además, no se hace
> responsable por la transmisión completa y adecuada de la información
> contenida y el mensaje, retrasos en la recepción, integridad de la misma,
> intercepción o interferencia alguna. Si Ud. no es la persona a quien se
> dirige esta comunicación favor de devolverla a su remitente y borrar y
> destruir todas las copias de la misma.
> ------------------------------
>



-- 
Best Regards,
Arik Sapojnik
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to