[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] proposed Scheduler interface change

David Gay dgay42 at gmail.com
Sat Oct 15 13:05:40 PDT 2005


On 10/15/05, Philip Levis <pal at cs.stanford.edu> wrote:
> On Oct 15, 2005, at 11:20 AM, David Gay wrote:
> > Minor related change: __nesc_atomic_sleep should disable interrupts
> > after the sleep completes. This isn't really necessary, but it makes
> > its use inside an atomic section cleaner.
>
> I think this is chip-dependent. IIRC, Phil B. had some observations
> about this when working on the px, where sleep automatically re-
> enabled interrupts? This is what led to the atomic sleep call...

That's not the question. The question is, once the sleep completes
(presumably because some interrupt just ran), should we redisable
interrupts (non-atomically)? I'd say yes, because __nesc_atomic_sleep
(implicitly) starts with interrupts off. It's not particularly
crucial, though, because you can of course just write:
  __nesc_atomic_sleep();
  __nesc_enable_interrupts();

David

_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg


More information about the Tinyos-host-mote-wg mailing list