On Wednesday 27 September 2006 11:18 am, gagan gaba wrote: > can somebody please guide me how interrupts are > handled in tinyos 1.1.0 . > i have gone through all the tiny os material available > on net but couldnt able to find how interrupts are > generated and handled and how tinyos get back to its > last task.
Here's two links that you might find helpful. Tasks and interrupts are central components of the TinyOS architecture. You probably need a more thorough understanding of TinyOS so you can see how these things fit together. http://csl.stanford.edu/~pal/pubs/tinyos-programming.pdf http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg06375.html I'd also recommend, if you haven't, to at least download the code and look through it. You can drill down into a component to find its ISR entry point(s) and follow through the call chain to see some specific examples. At the risk of not understanding your question, I'll take a more specific crack at answering it: The TinyOS scheduler is straightforward. Tasks are posted to the task queue, tasks are executed first-come/first-served, each task completes before the next task can begin. Tasks can be interrupted by code running in async context, such as code that is called, directly or indirectly, from an interrupt handler. When the interrupt handler finally returns, execution continues where it was, possibly in a task. If a task completes and there are no more tasks on the task queue, the system can go idle, to be awakened by a future interrupt whose code may post one or more tasks which will eventually run when the interrupt returns. And so on. _______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help