[Tinyos-devel] SplitControl Power Manager

Roman Lim rlim at ee.ethz.ch
Mon Mar 2 06:32:22 PST 2009

I recently had a case, where the DeferredPowerManager did not work
properly. If a client requests the resource and the powermanager is in
the deferring mode, it calls splitcontrol.start. if this call does not
return SUCCESS, but EALREADY, as it is supposed to do, the Powermanager
(DefaultResourceOwner) never releases the resource.
I added a patch that checks for this cases and releases the resource
properly. I introduced also another atomic section (line 109) because I
don't believe that the stopTimer and stopping states are protected from
the async access in ResourceDefaultOwner.requested.

I think the same changes would also make sense in the non-deferred case
for splitphase.

If someone could check this and commit it to the cvs...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: DeferredPowerManagerP.nc.patch
Type: text/x-patch
Size: 1313 bytes
Desc: not available
Url : https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20090302/5181ba22/attachment-0001.bin 

More information about the Tinyos-devel mailing list