[Tinyos-8051wg] Re: [Tinyos-2.0wg] Timer.fired
Philip Levis
pal at cs.berkeley.edu
Thu May 19 22:42:07 PDT 2005
On May 19, 2005, at 8:14 PM, Cory Sharp wrote:
> On 5/19/05, Joe Polastre <joe.polastre at gmail.com> wrote:
>
>> Except if an underlying interrupt occurred from an Alarm while I was
>> asking (in task context) how many timers I missed.
>>
>
> I don't understand. What are you and Phil thinking is going to happen
> in this case that's bad? An interrupt occurs and another task is
> posted...
>
numMissed and when are stored in some internal state variables, then
passed in the firing task. Here's the situation I see:
interrupt fires, variables set, task posted
task starts running, fired event calls howMany() command
interrupt fires, variables changed, task posted (but fails, already
posted)
task continues running, calls when() command
The results of when() and howMany() could be inconsistent.
It may be that this is not an issue in your implementation, but it
could be an issue in another implementation; interface itself has the
possibility of race conditions, because it's something that sits on
top of an interrupt source.
Phil
-------
"We shall not cease from exploration
And the end of all our exploring
Will be to arrive where we started
And know the place for the first time."
- T. S. Eliot, 'Little Gidding'
_______________________________________________
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-8051wg
mailing list