]> oss.titaniummirror.com Git - tinyos-2.x.git/commit
Fixed a bug found by Maxime Muller:
authorjanhauer <janhauer>
Thu, 5 Apr 2007 13:42:36 +0000 (13:42 +0000)
committerjanhauer <janhauer>
Thu, 5 Apr 2007 13:42:36 +0000 (13:42 +0000)
commitc9f579f1f7314e402097fa13290702bbfc32e00d
tree56ee281cd543cd840091a47d306a57f4fe14be8b
parent4c72ab7118395fe791aef9aafe29d501a94f6967
Fixed a bug found by Maxime Muller:

> during event void AdcResource.granted[uint8_t client]()
> If your sref is not REFERENCE_VREFplus_AVss ||
> REFERENCE_VREFplus_VREFnegterm
> then you will never call Refvolt_1/2_5V.start()
> Now while releasing the resource, imho, we should do the same check
> else we end up with a post switchOff() loop
> as call RefVolt_1_5V.stop() will fail.

Fix: changed the "owner" variable to "syncOwner", which is now only modified in sync (task) context and have the async path "parallel" and unaffecting the "syncOwner" variable (hard to explain, have a look at the diff) - there's a test app in tinyos-2.x/apps/tests/msp430/Adc12.
tos/chips/msp430/adc12/Msp430RefVoltArbiterImplP.nc