]> oss.titaniummirror.com Git - tinyos-2.x.git/commit
Fix startup in SoftwareInit.init overwriting changes to StateC's.
authorR. Steve McKown <rsmckown@gmail.com>
Mon, 19 Apr 2010 22:13:15 +0000 (16:13 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Mon, 19 Apr 2010 22:13:15 +0000 (16:13 -0600)
commit20150f888460e06a59b649ff19da9682768ab3b7
tree4ee2197593383b5bfc65994168a3373064b8848c
parent88bc2aa5e7e7c3870700a40d78829b51d3ae3754
Fix startup in SoftwareInit.init overwriting changes to StateC's.

If a component wires its Init.init() via SoftwareInit and ncc calls
StateImplP.Init.init() after the component's Init.init(), any change to its
StateC, such as call State.forceState(), is undone.  The easy fix is to remove
the extra initiation of state[] in StateImplP.Init.init(), since state[] is a
static and is guaranteed to have members with value zero (S_IDLE).
tos/system/StateImplP.nc