// automatically generated by stateify. //go:build 386 || amd64 // +build 386 amd64 package cpuid import ( "gvisor.dev/gvisor/pkg/state" ) func (c *Cache) StateTypeName() string { return "pkg/cpuid.Cache" } func (c *Cache) StateFields() []string { return []string{ "Level", "Type", "FullyAssociative", "Partitions", "Ways", "Sets", "InvalidateHierarchical", "Inclusive", "DirectMapped", } } func (c *Cache) beforeSave() {} // +checklocksignore func (c *Cache) StateSave(stateSinkObject state.Sink) { c.beforeSave() stateSinkObject.Save(0, &c.Level) stateSinkObject.Save(1, &c.Type) stateSinkObject.Save(2, &c.FullyAssociative) stateSinkObject.Save(3, &c.Partitions) stateSinkObject.Save(4, &c.Ways) stateSinkObject.Save(5, &c.Sets) stateSinkObject.Save(6, &c.InvalidateHierarchical) stateSinkObject.Save(7, &c.Inclusive) stateSinkObject.Save(8, &c.DirectMapped) } func (c *Cache) afterLoad() {} // +checklocksignore func (c *Cache) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &c.Level) stateSourceObject.Load(1, &c.Type) stateSourceObject.Load(2, &c.FullyAssociative) stateSourceObject.Load(3, &c.Partitions) stateSourceObject.Load(4, &c.Ways) stateSourceObject.Load(5, &c.Sets) stateSourceObject.Load(6, &c.InvalidateHierarchical) stateSourceObject.Load(7, &c.Inclusive) stateSourceObject.Load(8, &c.DirectMapped) } func (fs *FeatureSet) StateTypeName() string { return "pkg/cpuid.FeatureSet" } func (fs *FeatureSet) StateFields() []string { return []string{ "Set", "VendorID", "ExtendedFamily", "ExtendedModel", "ProcessorType", "Family", "Model", "SteppingID", "Caches", "CacheLine", } } func (fs *FeatureSet) beforeSave() {} // +checklocksignore func (fs *FeatureSet) StateSave(stateSinkObject state.Sink) { fs.beforeSave() stateSinkObject.Save(0, &fs.Set) stateSinkObject.Save(1, &fs.VendorID) stateSinkObject.Save(2, &fs.ExtendedFamily) stateSinkObject.Save(3, &fs.ExtendedModel) stateSinkObject.Save(4, &fs.ProcessorType) stateSinkObject.Save(5, &fs.Family) stateSinkObject.Save(6, &fs.Model) stateSinkObject.Save(7, &fs.SteppingID) stateSinkObject.Save(8, &fs.Caches) stateSinkObject.Save(9, &fs.CacheLine) } func (fs *FeatureSet) afterLoad() {} // +checklocksignore func (fs *FeatureSet) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &fs.Set) stateSourceObject.Load(1, &fs.VendorID) stateSourceObject.Load(2, &fs.ExtendedFamily) stateSourceObject.Load(3, &fs.ExtendedModel) stateSourceObject.Load(4, &fs.ProcessorType) stateSourceObject.Load(5, &fs.Family) stateSourceObject.Load(6, &fs.Model) stateSourceObject.Load(7, &fs.SteppingID) stateSourceObject.Load(8, &fs.Caches) stateSourceObject.Load(9, &fs.CacheLine) } func init() { state.Register((*Cache)(nil)) state.Register((*FeatureSet)(nil)) }