You can sort of think of a task as a "deferred" function call. Explicitly making a function call (in the traditional sense), causes the program to jump to that function and execute the code it contains immediately.
Posting a task, however, tells the program to set the function aside until all of its more critical functions have completed (such as those servicing an interrupt handler). Any tasks you post will be run in first-come-first-serve order (at least with the default scheduler) after any code reachable from interrupt context has completed. Tasks are interruptable by any code reachable by an interrupt handler (commands / events marked with async), and will continue execution where they left off once the async code has finished. Kevin On 10/11/07, Roberto <[EMAIL PROTECTED]> wrote: > Hi all, > I read the tutorials on tinyos-2.x but i still haven't understood the > difference between a function (in C style) and a task > Does anyone explain me this difference, please? > Thanks in advance > > > > -- > Platform: Linux Fedora > TinyOS version: 2.x > Programmer: MIB510 > Device(s): Micaz, Stargate > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- ~Kevin _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
