[Tinyos-help] A question on sync/async code
Bin Lei
leibin.nju at gmail.com
Sun Aug 12 21:25:22 PDT 2007
In the user manual, AC is defined as code is reachable from at least
one interrrupt handler; while SC is code only reachable from tasks.
But there are many event handler that are not tagged using async, are
they async or sync?
e.g. in Blink example, three timer could fire simultaneously
according to their frequency, and they triggered different control
flow, is it possible that interfere with each other, i.e. one event
handler is preempted by another?
event void Timer0.fired()
{
dbg("BlinkC", "Timer 0 fired @ %s.\n", sim_time_string());
call Leds.led0Toggle();
}
event void Timer1.fired()
{
dbg("BlinkC", "Timer 1 fired @ %s \n", sim_time_string());
call Leds.led1Toggle();
}
event void Timer2.fired()
{
dbg("BlinkC", "Timer 2 fired @ %s.\n", sim_time_string());
call Leds.led2Toggle();
}
More information about the Tinyos-help
mailing list