github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/pkg/atomicbitops/atomicbitops_32bit_unsafe_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 "context" 10 11 "github.com/metacubex/gvisor/pkg/state" 12 ) 13 14 func (i *Int64) StateTypeName() string { 15 return "pkg/atomicbitops.Int64" 16 } 17 18 func (i *Int64) StateFields() []string { 19 return []string{ 20 "value", 21 "value32", 22 } 23 } 24 25 func (i *Int64) beforeSave() {} 26 27 // +checklocksignore 28 func (i *Int64) StateSave(stateSinkObject state.Sink) { 29 i.beforeSave() 30 stateSinkObject.Save(0, &i.value) 31 stateSinkObject.Save(1, &i.value32) 32 } 33 34 func (i *Int64) afterLoad(context.Context) {} 35 36 // +checklocksignore 37 func (i *Int64) StateLoad(ctx context.Context, stateSourceObject state.Source) { 38 stateSourceObject.Load(0, &i.value) 39 stateSourceObject.Load(1, &i.value32) 40 } 41 42 func (u *Uint64) StateTypeName() string { 43 return "pkg/atomicbitops.Uint64" 44 } 45 46 func (u *Uint64) StateFields() []string { 47 return []string{ 48 "value", 49 "value32", 50 } 51 } 52 53 func (u *Uint64) beforeSave() {} 54 55 // +checklocksignore 56 func (u *Uint64) StateSave(stateSinkObject state.Sink) { 57 u.beforeSave() 58 stateSinkObject.Save(0, &u.value) 59 stateSinkObject.Save(1, &u.value32) 60 } 61 62 func (u *Uint64) afterLoad(context.Context) {} 63 64 // +checklocksignore 65 func (u *Uint64) StateLoad(ctx context.Context, stateSourceObject state.Source) { 66 stateSourceObject.Load(0, &u.value) 67 stateSourceObject.Load(1, &u.value32) 68 } 69 70 func init() { 71 state.Register((*Int64)(nil)) 72 state.Register((*Uint64)(nil)) 73 }