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