github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/sentry/fsutil/fsutil_impl_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package fsutil 4 5 import ( 6 "github.com/nicocha30/gvisor-ligolo/pkg/state" 7 ) 8 9 func (s *DirtySet) StateTypeName() string { 10 return "pkg/sentry/fsutil.DirtySet" 11 } 12 13 func (s *DirtySet) StateFields() []string { 14 return []string{ 15 "root", 16 } 17 } 18 19 func (s *DirtySet) beforeSave() {} 20 21 // +checklocksignore 22 func (s *DirtySet) StateSave(stateSinkObject state.Sink) { 23 s.beforeSave() 24 var rootValue *DirtySegmentDataSlices 25 rootValue = s.saveRoot() 26 stateSinkObject.SaveValue(0, rootValue) 27 } 28 29 func (s *DirtySet) afterLoad() {} 30 31 // +checklocksignore 32 func (s *DirtySet) StateLoad(stateSourceObject state.Source) { 33 stateSourceObject.LoadValue(0, new(*DirtySegmentDataSlices), func(y any) { s.loadRoot(y.(*DirtySegmentDataSlices)) }) 34 } 35 36 func (n *Dirtynode) StateTypeName() string { 37 return "pkg/sentry/fsutil.Dirtynode" 38 } 39 40 func (n *Dirtynode) StateFields() []string { 41 return []string{ 42 "nrSegments", 43 "parent", 44 "parentIndex", 45 "hasChildren", 46 "maxGap", 47 "keys", 48 "values", 49 "children", 50 } 51 } 52 53 func (n *Dirtynode) beforeSave() {} 54 55 // +checklocksignore 56 func (n *Dirtynode) StateSave(stateSinkObject state.Sink) { 57 n.beforeSave() 58 stateSinkObject.Save(0, &n.nrSegments) 59 stateSinkObject.Save(1, &n.parent) 60 stateSinkObject.Save(2, &n.parentIndex) 61 stateSinkObject.Save(3, &n.hasChildren) 62 stateSinkObject.Save(4, &n.maxGap) 63 stateSinkObject.Save(5, &n.keys) 64 stateSinkObject.Save(6, &n.values) 65 stateSinkObject.Save(7, &n.children) 66 } 67 68 func (n *Dirtynode) afterLoad() {} 69 70 // +checklocksignore 71 func (n *Dirtynode) StateLoad(stateSourceObject state.Source) { 72 stateSourceObject.Load(0, &n.nrSegments) 73 stateSourceObject.Load(1, &n.parent) 74 stateSourceObject.Load(2, &n.parentIndex) 75 stateSourceObject.Load(3, &n.hasChildren) 76 stateSourceObject.Load(4, &n.maxGap) 77 stateSourceObject.Load(5, &n.keys) 78 stateSourceObject.Load(6, &n.values) 79 stateSourceObject.Load(7, &n.children) 80 } 81 82 func (d *DirtySegmentDataSlices) StateTypeName() string { 83 return "pkg/sentry/fsutil.DirtySegmentDataSlices" 84 } 85 86 func (d *DirtySegmentDataSlices) StateFields() []string { 87 return []string{ 88 "Start", 89 "End", 90 "Values", 91 } 92 } 93 94 func (d *DirtySegmentDataSlices) beforeSave() {} 95 96 // +checklocksignore 97 func (d *DirtySegmentDataSlices) StateSave(stateSinkObject state.Sink) { 98 d.beforeSave() 99 stateSinkObject.Save(0, &d.Start) 100 stateSinkObject.Save(1, &d.End) 101 stateSinkObject.Save(2, &d.Values) 102 } 103 104 func (d *DirtySegmentDataSlices) afterLoad() {} 105 106 // +checklocksignore 107 func (d *DirtySegmentDataSlices) StateLoad(stateSourceObject state.Source) { 108 stateSourceObject.Load(0, &d.Start) 109 stateSourceObject.Load(1, &d.End) 110 stateSourceObject.Load(2, &d.Values) 111 } 112 113 func (s *FileRangeSet) StateTypeName() string { 114 return "pkg/sentry/fsutil.FileRangeSet" 115 } 116 117 func (s *FileRangeSet) StateFields() []string { 118 return []string{ 119 "root", 120 } 121 } 122 123 func (s *FileRangeSet) beforeSave() {} 124 125 // +checklocksignore 126 func (s *FileRangeSet) StateSave(stateSinkObject state.Sink) { 127 s.beforeSave() 128 var rootValue *FileRangeSegmentDataSlices 129 rootValue = s.saveRoot() 130 stateSinkObject.SaveValue(0, rootValue) 131 } 132 133 func (s *FileRangeSet) afterLoad() {} 134 135 // +checklocksignore 136 func (s *FileRangeSet) StateLoad(stateSourceObject state.Source) { 137 stateSourceObject.LoadValue(0, new(*FileRangeSegmentDataSlices), func(y any) { s.loadRoot(y.(*FileRangeSegmentDataSlices)) }) 138 } 139 140 func (n *FileRangenode) StateTypeName() string { 141 return "pkg/sentry/fsutil.FileRangenode" 142 } 143 144 func (n *FileRangenode) StateFields() []string { 145 return []string{ 146 "nrSegments", 147 "parent", 148 "parentIndex", 149 "hasChildren", 150 "maxGap", 151 "keys", 152 "values", 153 "children", 154 } 155 } 156 157 func (n *FileRangenode) beforeSave() {} 158 159 // +checklocksignore 160 func (n *FileRangenode) StateSave(stateSinkObject state.Sink) { 161 n.beforeSave() 162 stateSinkObject.Save(0, &n.nrSegments) 163 stateSinkObject.Save(1, &n.parent) 164 stateSinkObject.Save(2, &n.parentIndex) 165 stateSinkObject.Save(3, &n.hasChildren) 166 stateSinkObject.Save(4, &n.maxGap) 167 stateSinkObject.Save(5, &n.keys) 168 stateSinkObject.Save(6, &n.values) 169 stateSinkObject.Save(7, &n.children) 170 } 171 172 func (n *FileRangenode) afterLoad() {} 173 174 // +checklocksignore 175 func (n *FileRangenode) StateLoad(stateSourceObject state.Source) { 176 stateSourceObject.Load(0, &n.nrSegments) 177 stateSourceObject.Load(1, &n.parent) 178 stateSourceObject.Load(2, &n.parentIndex) 179 stateSourceObject.Load(3, &n.hasChildren) 180 stateSourceObject.Load(4, &n.maxGap) 181 stateSourceObject.Load(5, &n.keys) 182 stateSourceObject.Load(6, &n.values) 183 stateSourceObject.Load(7, &n.children) 184 } 185 186 func (f *FileRangeSegmentDataSlices) StateTypeName() string { 187 return "pkg/sentry/fsutil.FileRangeSegmentDataSlices" 188 } 189 190 func (f *FileRangeSegmentDataSlices) StateFields() []string { 191 return []string{ 192 "Start", 193 "End", 194 "Values", 195 } 196 } 197 198 func (f *FileRangeSegmentDataSlices) beforeSave() {} 199 200 // +checklocksignore 201 func (f *FileRangeSegmentDataSlices) StateSave(stateSinkObject state.Sink) { 202 f.beforeSave() 203 stateSinkObject.Save(0, &f.Start) 204 stateSinkObject.Save(1, &f.End) 205 stateSinkObject.Save(2, &f.Values) 206 } 207 208 func (f *FileRangeSegmentDataSlices) afterLoad() {} 209 210 // +checklocksignore 211 func (f *FileRangeSegmentDataSlices) StateLoad(stateSourceObject state.Source) { 212 stateSourceObject.Load(0, &f.Start) 213 stateSourceObject.Load(1, &f.End) 214 stateSourceObject.Load(2, &f.Values) 215 } 216 217 func (s *FrameRefSet) StateTypeName() string { 218 return "pkg/sentry/fsutil.FrameRefSet" 219 } 220 221 func (s *FrameRefSet) StateFields() []string { 222 return []string{ 223 "root", 224 } 225 } 226 227 func (s *FrameRefSet) beforeSave() {} 228 229 // +checklocksignore 230 func (s *FrameRefSet) StateSave(stateSinkObject state.Sink) { 231 s.beforeSave() 232 var rootValue *FrameRefSegmentDataSlices 233 rootValue = s.saveRoot() 234 stateSinkObject.SaveValue(0, rootValue) 235 } 236 237 func (s *FrameRefSet) afterLoad() {} 238 239 // +checklocksignore 240 func (s *FrameRefSet) StateLoad(stateSourceObject state.Source) { 241 stateSourceObject.LoadValue(0, new(*FrameRefSegmentDataSlices), func(y any) { s.loadRoot(y.(*FrameRefSegmentDataSlices)) }) 242 } 243 244 func (n *FrameRefnode) StateTypeName() string { 245 return "pkg/sentry/fsutil.FrameRefnode" 246 } 247 248 func (n *FrameRefnode) StateFields() []string { 249 return []string{ 250 "nrSegments", 251 "parent", 252 "parentIndex", 253 "hasChildren", 254 "maxGap", 255 "keys", 256 "values", 257 "children", 258 } 259 } 260 261 func (n *FrameRefnode) beforeSave() {} 262 263 // +checklocksignore 264 func (n *FrameRefnode) StateSave(stateSinkObject state.Sink) { 265 n.beforeSave() 266 stateSinkObject.Save(0, &n.nrSegments) 267 stateSinkObject.Save(1, &n.parent) 268 stateSinkObject.Save(2, &n.parentIndex) 269 stateSinkObject.Save(3, &n.hasChildren) 270 stateSinkObject.Save(4, &n.maxGap) 271 stateSinkObject.Save(5, &n.keys) 272 stateSinkObject.Save(6, &n.values) 273 stateSinkObject.Save(7, &n.children) 274 } 275 276 func (n *FrameRefnode) afterLoad() {} 277 278 // +checklocksignore 279 func (n *FrameRefnode) StateLoad(stateSourceObject state.Source) { 280 stateSourceObject.Load(0, &n.nrSegments) 281 stateSourceObject.Load(1, &n.parent) 282 stateSourceObject.Load(2, &n.parentIndex) 283 stateSourceObject.Load(3, &n.hasChildren) 284 stateSourceObject.Load(4, &n.maxGap) 285 stateSourceObject.Load(5, &n.keys) 286 stateSourceObject.Load(6, &n.values) 287 stateSourceObject.Load(7, &n.children) 288 } 289 290 func (f *FrameRefSegmentDataSlices) StateTypeName() string { 291 return "pkg/sentry/fsutil.FrameRefSegmentDataSlices" 292 } 293 294 func (f *FrameRefSegmentDataSlices) StateFields() []string { 295 return []string{ 296 "Start", 297 "End", 298 "Values", 299 } 300 } 301 302 func (f *FrameRefSegmentDataSlices) beforeSave() {} 303 304 // +checklocksignore 305 func (f *FrameRefSegmentDataSlices) StateSave(stateSinkObject state.Sink) { 306 f.beforeSave() 307 stateSinkObject.Save(0, &f.Start) 308 stateSinkObject.Save(1, &f.End) 309 stateSinkObject.Save(2, &f.Values) 310 } 311 312 func (f *FrameRefSegmentDataSlices) afterLoad() {} 313 314 // +checklocksignore 315 func (f *FrameRefSegmentDataSlices) StateLoad(stateSourceObject state.Source) { 316 stateSourceObject.Load(0, &f.Start) 317 stateSourceObject.Load(1, &f.End) 318 stateSourceObject.Load(2, &f.Values) 319 } 320 321 func init() { 322 state.Register((*DirtySet)(nil)) 323 state.Register((*Dirtynode)(nil)) 324 state.Register((*DirtySegmentDataSlices)(nil)) 325 state.Register((*FileRangeSet)(nil)) 326 state.Register((*FileRangenode)(nil)) 327 state.Register((*FileRangeSegmentDataSlices)(nil)) 328 state.Register((*FrameRefSet)(nil)) 329 state.Register((*FrameRefnode)(nil)) 330 state.Register((*FrameRefSegmentDataSlices)(nil)) 331 }