[Tinyos-help] (yet another) Question about signal

Michael Schippling schip at santafe.edu
Tue Nov 13 23:30:51 PST 2007


OK, good. Then another stupid question: "signal" == noop?
Or is there some mystery utility like making the compiler
not complain about an "async event" being called directly
(which seems to be the only way it's ever executed)?
I guess the same question applies to "call" as well...
MS


Philip Levis wrote:
> 
> On Nov 13, 2007, at 8:35 PM, Michael Schippling wrote:
> 
>> So I guess my question is...is signal tantamount to an interrupt,
>> or is it 'just' a function call? E.g, here's an interrupt routine
>> that I cobbled together in cargo-cult fashion which does a 'callback'
>> to a user "async event":
>>
>>   default async event result_t HPLT3capture.fire( uint16_t count )
>>   { return SUCCESS; }
>>
>>   TOSH_INTERRUPT(SIG_INPUT_CAPTURE3)
>>   {
>>     // ...do interrupt stuff...
>>     // warn user
>>     signal HPLT3capture.fire( count );
>>   }
>>
>> Does fire() run in the original interrupt context or as a separate
>> "software interrupt"? If it runs in the original context can I do
>>     rval = signal HPLT3capture.fire( count );
>> to get its result?
> 
> It is just a function call.
> 
> You can get its result.
> 
> Phil


More information about the Tinyos-help mailing list