On Saturday 09 September 2006 08:33 am, jose m wrote: > Conor Todd says that the async events can't be > interrupted by another interrupt.
Conor's first reply to this thread contained a typo. He clearly meant "atomic{}" and not "async{}", which Phillip pointed out. > Philip Levis says > that te interrupts are enabled when an interrupt > declared with the INTERRUPT keyword is running (and so > every async event signalled by this one). What's the > true? Both. You may be confusing two separate concepts: atomic sections and async context. Code within an atomic block, denoted by the use of the keyword 'atomic', executes with interrupts disabled. The 'async' keyword allows the nesC compiler to know what code can execute outside of task context and enforces no policy with regard to interrupt handling. In other words, the 'async' keyword tells you nothing about how interrupts are dealt with. Consider the msp430, which provides two macros to assist in the declaration of interrupt handlers. TOSH_SIGNAL is used to define a handler that executes with interrupts deferred. Now, consider two interrupt handlers, handleA, defined with TOSH_SIGNAL and handleB, defined with TOSH_INTERRUPT. If both call the async function myAsync(), then myAsync() is sometimes executed with interrupts deferred and sometimes executed with interrupts disabled. Hope this helps, Steve _______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help