github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/atomicbitops/atomicbitops_64bit_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 //go:build !arm && !mips && !mipsle && !386 && !arm && !mips && !mipsle && !386 4 // +build !arm,!mips,!mipsle,!386,!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 (i *Int64) StateTypeName() string { 63 return "pkg/atomicbitops.Int64" 64 } 65 66 func (i *Int64) StateFields() []string { 67 return []string{ 68 "value", 69 } 70 } 71 72 func (i *Int64) beforeSave() {} 73 74 // +checklocksignore 75 func (i *Int64) StateSave(stateSinkObject state.Sink) { 76 i.beforeSave() 77 stateSinkObject.Save(0, &i.value) 78 } 79 80 func (i *Int64) afterLoad() {} 81 82 // +checklocksignore 83 func (i *Int64) StateLoad(stateSourceObject state.Source) { 84 stateSourceObject.Load(0, &i.value) 85 } 86 87 func (u *Uint64) StateTypeName() string { 88 return "pkg/atomicbitops.Uint64" 89 } 90 91 func (u *Uint64) StateFields() []string { 92 return []string{ 93 "value", 94 } 95 } 96 97 func (u *Uint64) beforeSave() {} 98 99 // +checklocksignore 100 func (u *Uint64) StateSave(stateSinkObject state.Sink) { 101 u.beforeSave() 102 stateSinkObject.Save(0, &u.value) 103 } 104 105 func (u *Uint64) afterLoad() {} 106 107 // +checklocksignore 108 func (u *Uint64) StateLoad(stateSourceObject state.Source) { 109 stateSourceObject.Load(0, &u.value) 110 } 111 112 func init() { 113 state.Register((*Int32)(nil)) 114 state.Register((*Uint32)(nil)) 115 state.Register((*Int64)(nil)) 116 state.Register((*Uint64)(nil)) 117 }