| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
package atomicbitops |
| 7 |
|
| 8 |
import ( |
| 9 |
"inet.af/netstack/state" |
| 10 |
) |
| 11 |
|
| 12 |
func (aa *AlignedAtomicInt64) StateTypeName() string { |
| 13 |
return "pkg/atomicbitops.AlignedAtomicInt64" |
| 14 |
} |
| 15 |
|
| 16 |
func (aa *AlignedAtomicInt64) StateFields() []string { |
| 17 |
return []string{ |
| 18 |
"value", |
| 19 |
"value32", |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
func (aa *AlignedAtomicInt64) beforeSave() {} |
| 24 |
|
| 25 |
|
| 26 |
func (aa *AlignedAtomicInt64) StateSave(stateSinkObject state.Sink) { |
| 27 |
aa.beforeSave() |
| 28 |
stateSinkObject.Save(0, &aa.value) |
| 29 |
stateSinkObject.Save(1, &aa.value32) |
| 30 |
} |
| 31 |
|
| 32 |
func (aa *AlignedAtomicInt64) afterLoad() {} |
| 33 |
|
| 34 |
|
| 35 |
func (aa *AlignedAtomicInt64) StateLoad(stateSourceObject state.Source) { |
| 36 |
stateSourceObject.Load(0, &aa.value) |
| 37 |
stateSourceObject.Load(1, &aa.value32) |
| 38 |
} |
| 39 |
|
| 40 |
func (aa *AlignedAtomicUint64) StateTypeName() string { |
| 41 |
return "pkg/atomicbitops.AlignedAtomicUint64" |
| 42 |
} |
| 43 |
|
| 44 |
func (aa *AlignedAtomicUint64) StateFields() []string { |
| 45 |
return []string{ |
| 46 |
"value", |
| 47 |
"value32", |
| 48 |
} |
| 49 |
} |
| 50 |
|
| 51 |
func (aa *AlignedAtomicUint64) beforeSave() {} |
| 52 |
|
| 53 |
|
| 54 |
func (aa *AlignedAtomicUint64) StateSave(stateSinkObject state.Sink) { |
| 55 |
aa.beforeSave() |
| 56 |
stateSinkObject.Save(0, &aa.value) |
| 57 |
stateSinkObject.Save(1, &aa.value32) |
| 58 |
} |
| 59 |
|
| 60 |
func (aa *AlignedAtomicUint64) afterLoad() {} |
| 61 |
|
| 62 |
|
| 63 |
func (aa *AlignedAtomicUint64) StateLoad(stateSourceObject state.Source) { |
| 64 |
stateSourceObject.Load(0, &aa.value) |
| 65 |
stateSourceObject.Load(1, &aa.value32) |
| 66 |
} |
| 67 |
|
| 68 |
func init() { |
| 69 |
state.Register((*AlignedAtomicInt64)(nil)) |
| 70 |
state.Register((*AlignedAtomicUint64)(nil)) |
| 71 |
} |