github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/atomicbitops/atomicbitops_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 //go:build (amd64 || arm64) && !amd64 && !arm64 4 // +build amd64 arm64 5 // +build !amd64 6 // +build !arm64 7 8 package atomicbitops 9 10 import ( 11 "github.com/nicocha30/gvisor-ligolo/pkg/state" 12 ) 13 14 func (f *Float64) StateTypeName() string { 15 return "pkg/atomicbitops.Float64" 16 } 17 18 func (f *Float64) StateFields() []string { 19 return []string{ 20 "bits", 21 } 22 } 23 24 func (f *Float64) beforeSave() {} 25 26 // +checklocksignore 27 func (f *Float64) StateSave(stateSinkObject state.Sink) { 28 f.beforeSave() 29 stateSinkObject.Save(0, &f.bits) 30 } 31 32 func (f *Float64) afterLoad() {} 33 34 // +checklocksignore 35 func (f *Float64) StateLoad(stateSourceObject state.Source) { 36 stateSourceObject.Load(0, &f.bits) 37 } 38 39 func (b *Bool) StateTypeName() string { 40 return "pkg/atomicbitops.Bool" 41 } 42 43 func (b *Bool) StateFields() []string { 44 return []string{ 45 "Uint32", 46 } 47 } 48 49 func (b *Bool) beforeSave() {} 50 51 // +checklocksignore 52 func (b *Bool) StateSave(stateSinkObject state.Sink) { 53 b.beforeSave() 54 stateSinkObject.Save(0, &b.Uint32) 55 } 56 57 func (b *Bool) afterLoad() {} 58 59 // +checklocksignore 60 func (b *Bool) StateLoad(stateSourceObject state.Source) { 61 stateSourceObject.Load(0, &b.Uint32) 62 } 63 64 func init() { 65 state.Register((*Float64)(nil)) 66 state.Register((*Bool)(nil)) 67 }