[Tinyos-devel] AMSend.cancel command clarification request
Andreas Koepke
koepke at tkn.tu-berlin.de
Mon Mar 19 02:17:46 PDT 2007
Since AMQeueImplP was not meant to be a reference implementation I'm
less confused. A simple "must result in an sendDone(ECANCEL) event" in
the interface description is sufficient. One could add an advise:
Implementors should make sure that the cancel command returns before the
sendDone(ECANCEL) is signalled.
It is easier to signal it from within cancel, therefore I think this
repetition is justified here.
Best, Andreas
Philip Levis wrote:
> On Mar 15, 2007, at 10:21 AM, Andreas Koepke wrote:
>
>> [...]
>>
>>> Hm. I'm wondering if signaling sendDone from the cancel() command is
>>> problematic. It breaks one of the programming hints. The other option
>>> is to keep a bitmask of which packets are cancelled, post a task, and
>>> cycle through the mask.
>>
>>
>> ok - done using the bit mask and the deferred signal via a task. I know
>> that at leats I have a problem with the race conditions introduced when
>> sendDone is signalled from inside a command. So I better not confuse all
>> other guys...
>
>
> Yeah, if the implementer ran into trouble with it, chances are it isn't
> the most robust solution. :)
>
> Core is going to talk about radio stacks next week or the week after
> (i.e., TEP 105). I'll try to remember to bring up the cancel() semantics.
>
> Phil
>
More information about the Tinyos-devel
mailing list