[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] Resource handles

Joe Polastre joe at polastre.com
Fri Oct 21 21:17:58 PDT 2005


> I think you missed my point (we're all lacking in clear explanations
> it seems) - if Cory wants to simplify the above code it has to have a
> separate request command and granted event (otherwise what happens in
> the "it's busy now case"?). If you additionally want that to avoid
> posting a task, then the code in request has to signal the event
> immediately, leading to a deeper call stack and potential recursion.
> If that's not what Cory wants, then I'm confused...

Why does it have to signal an event?  As per the code snippet
described in my previous email, if immediateRequest returns SUCCESS,
then you *IMMEDIATELY* have the resource and there is absolutely no
need for a granted() event (thus no recursion, additions to the call
stack, and no delay in the execution as per Cory's original proposal).

If you ask for a request immediately, and it still goes through a
task, what was the point of doing the immediate request in the first
place?  The nomenclature in that case is incorrect--it should be a
priority request but not immediate as that is not the semantics that
the request takes.

-Joe

_______________________________________________
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