Kang,

Please search the TinyOS Help archives.  It seems like we discuss this at length at least once a month.  A handy form for search ing is here:

http://www.moteiv.com/community/TinyOS_Information

Short answer: commands and events are just like C functions, they're not tasks.

Cory

On 9/26/06, KANG HUI <[EMAIL PROTECTED]> wrote:
Dr. Levis:
If a command has the following code

command result_t A.p(){
   ...
   post TaskB();
   ...
}
If some module call A.p(), the execution sequence is : first A.p() is
put into the task queue and runs to
completion, and then TaskB will be executed until a later time. And the
return value of A.p() is whether TaskB be put into the task queue.
So command and event function is also two kinds of tasks. But a C-like
function such as
void f(){
}
is not a task and will return immediately.
Is my understanding right? Please correct me. Thanks.

Regards,
Hui

_______________________________________________
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