@@ -111,7 +111,7 @@ where
111
111
/// morally: Option<&'static PinList<R>>
112
112
/// We need to store the &'static PinList, which we might not get until runtime.
113
113
list : AtomicPtr < PinList < R > > ,
114
- /// This is a single waitcell which
114
+ /// This is a single waitcell which handles waking when the `state` field has changed
115
115
state_change : WaitCell ,
116
116
117
117
/// The following parts are "observable" in the linked list. We put it inside
@@ -139,7 +139,8 @@ pub struct Node<T> {
139
139
// should check this.
140
140
_pin : PhantomPinned ,
141
141
142
- // We generally want this to be in the tail position, because
142
+ // We generally want this to be in the tail position, because the size of T varies
143
+ // and the pointer to the `NodeHeader` must not change as described above.
143
144
t : MaybeUninit < T > ,
144
145
}
145
146
@@ -223,6 +224,9 @@ pub enum State {
223
224
/// TODO: Decide what our policy is for this: SHOULD we write default values
224
225
/// back to flash, or keep them out of flash until there has been an explict
225
226
/// change to the default value?
227
+ /// If we don't flash it, we reduce wear on the flash and save some time.
228
+ /// However, if the `default()` value changes (e.g., firmware update) this
229
+ /// gives a different result.
226
230
///
227
231
/// In this state, `t` IS valid, and may be read at any time (by the holder
228
232
/// of the lock).
0 commit comments