github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/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 "context" 10 11 "github.com/metacubex/gvisor/pkg/state" 12 ) 13 14 func (i *Int32) StateTypeName() string { 15 return "pkg/atomicbitops.Int32" 16 } 17 18 func (i *Int32) StateFields() []string { 19 return []string{ 20 "value", 21 } 22 } 23 24 func (i *Int32) beforeSave() {} 25 26 // +checklocksignore 27 func (i *Int32) StateSave(stateSinkObject state.Sink) { 28 i.beforeSave() 29 stateSinkObject.Save(0, &i.value) 30 } 31 32 func (i *Int32) afterLoad(context.Context) {} 33 34 // +checklocksignore 35 func (i *Int32) StateLoad(ctx context.Context, stateSourceObject state.Source) { 36 stateSourceObject.Load(0, &i.value) 37 } 38 39 func (u *Uint32) StateTypeName() string { 40 return "pkg/atomicbitops.Uint32" 41 } 42 43 func (u *Uint32) StateFields() []string { 44 return []string{ 45 "value", 46 } 47 } 48 49 func (u *Uint32) beforeSave() {} 50 51 // +checklocksignore 52 func (u *Uint32) StateSave(stateSinkObject state.Sink) { 53 u.beforeSave() 54 stateSinkObject.Save(0, &u.value) 55 } 56 57 func (u *Uint32) afterLoad(context.Context) {} 58 59 // +checklocksignore 60 func (u *Uint32) StateLoad(ctx context.Context, stateSourceObject state.Source) { 61 stateSourceObject.Load(0, &u.value) 62 } 63 64 func (b *Bool) StateTypeName() string { 65 return "pkg/atomicbitops.Bool" 66 } 67 68 func (b *Bool) StateFields() []string { 69 return []string{ 70 "Uint32", 71 } 72 } 73 74 func (b *Bool) beforeSave() {} 75 76 // +checklocksignore 77 func (b *Bool) StateSave(stateSinkObject state.Sink) { 78 b.beforeSave() 79 stateSinkObject.Save(0, &b.Uint32) 80 } 81 82 func (b *Bool) afterLoad(context.Context) {} 83 84 // +checklocksignore 85 func (b *Bool) StateLoad(ctx context.Context, stateSourceObject state.Source) { 86 stateSourceObject.Load(0, &b.Uint32) 87 } 88 89 func (i *Int64) StateTypeName() string { 90 return "pkg/atomicbitops.Int64" 91 } 92 93 func (i *Int64) StateFields() []string { 94 return []string{ 95 "value", 96 } 97 } 98 99 func (i *Int64) beforeSave() {} 100 101 // +checklocksignore 102 func (i *Int64) StateSave(stateSinkObject state.Sink) { 103 i.beforeSave() 104 stateSinkObject.Save(0, &i.value) 105 } 106 107 func (i *Int64) afterLoad(context.Context) {} 108 109 // +checklocksignore 110 func (i *Int64) StateLoad(ctx context.Context, stateSourceObject state.Source) { 111 stateSourceObject.Load(0, &i.value) 112 } 113 114 func (u *Uint64) StateTypeName() string { 115 return "pkg/atomicbitops.Uint64" 116 } 117 118 func (u *Uint64) StateFields() []string { 119 return []string{ 120 "value", 121 } 122 } 123 124 func (u *Uint64) beforeSave() {} 125 126 // +checklocksignore 127 func (u *Uint64) StateSave(stateSinkObject state.Sink) { 128 u.beforeSave() 129 stateSinkObject.Save(0, &u.value) 130 } 131 132 func (u *Uint64) afterLoad(context.Context) {} 133 134 // +checklocksignore 135 func (u *Uint64) StateLoad(ctx context.Context, stateSourceObject state.Source) { 136 stateSourceObject.Load(0, &u.value) 137 } 138 139 func init() { 140 state.Register((*Int32)(nil)) 141 state.Register((*Uint32)(nil)) 142 state.Register((*Bool)(nil)) 143 state.Register((*Int64)(nil)) 144 state.Register((*Uint64)(nil)) 145 }