[Tinyos Core WG] 10.25.2006 Meeting Notes are on the wiki
David Gay
dgay42 at gmail.com
Fri Oct 27 20:47:57 PDT 2006
On 10/27/06, Jan Hauer <jan.hauer at gmail.com> wrote:
> In the telephone conference we agreed (preliminary) to allow arbiters
> to return SUCCESS to a client that calls Resource.request() even
> though he already owns the resource. On service level (abstracting
> from the Resource interface), however, we want a second call to
> Read.read() to fail if the first one was successful and readDone() has
> not been signalled.
>
> I was about to change the ADC HIL implementation, but there are some
> bigger changes necessary than I had expected - I have to keep state (a
> bit) for all clients now: when a client calls Read.read I must know
> whether he is the owner or not. But setting, say, an "owner" variable
> to the client ID when I get "his" Resource.granted() is not enough,
> because in between the client might call Read.read a second time. If
> he does, I cannot tell that he has called it successfully before (and
> not released it) unless I keep state for him [when the ReadNow
> interface is involved in conjunction with the Resource interface it
> probably gets more complicated]... I may well have overlooked
> something obvious, maybe someone sees an easy solution - otherwise I
> suggest to change the arbiter semantics rather than introduce the
> changes on the service level. Comments ?
Can't the Resource.isOwner() command help? (haven't thought it
through, but I assumed it would...)
I'm also confused by the "in between" bit above. In between what
exactly? Read.read() cannot be called between the arbiter signalling
granted and the event handler running (but yes, the same isn't so true
w/ ReadNow, though in that case it's the client who is responsible for
requesting the resource, so we can presumably ignore the issue)
David
More information about the Tinyos-2.0wg
mailing list