call TimerMilli.stop();
stopTimer = FALSE;
call StdControl.start();
- call SplitControl.start();
+ if (call SplitControl.start()==EALREADY)
+ call ResourceDefaultOwner.release();
}
task void timerTask() {
stopTimer = TRUE;
post startTask();
}
- else atomic requested = TRUE;
+ else requested = TRUE;
}
async event void ResourceDefaultOwner.immediateRequested() {
}
event void TimerMilli.fired() {
- if(stopTimer == FALSE) {
- stopping = TRUE;
- call PowerDownCleanup.cleanup();
- call StdControl.stop();
- call SplitControl.stop();
+ atomic {
+ if(stopTimer == FALSE) {
+ stopping = TRUE;
+ call PowerDownCleanup.cleanup();
+ call StdControl.stop();
+ if (call SplitControl.stop()==EALREADY)
+ signal SplitControl.stopDone(SUCCESS);
+ }
}
}