// automatically generated by stateify. // +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() {} 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() {} 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 (f *FeatureSet) StateTypeName() string { return "pkg/cpuid.FeatureSet" } func (f *FeatureSet) StateFields() []string { return []string{ "Set", "VendorID", "ExtendedFamily", "ExtendedModel", "ProcessorType", "Family", "Model", "SteppingID", "Caches", "CacheLine", } } func (f *FeatureSet) beforeSave() {} func (f *FeatureSet) StateSave(stateSinkObject state.Sink) { f.beforeSave() stateSinkObject.Save(0, &f.Set) stateSinkObject.Save(1, &f.VendorID) stateSinkObject.Save(2, &f.ExtendedFamily) stateSinkObject.Save(3, &f.ExtendedModel) stateSinkObject.Save(4, &f.ProcessorType) stateSinkObject.Save(5, &f.Family) stateSinkObject.Save(6, &f.Model) stateSinkObject.Save(7, &f.SteppingID) stateSinkObject.Save(8, &f.Caches) stateSinkObject.Save(9, &f.CacheLine) } func (f *FeatureSet) afterLoad() {} func (f *FeatureSet) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &f.Set) stateSourceObject.Load(1, &f.VendorID) stateSourceObject.Load(2, &f.ExtendedFamily) stateSourceObject.Load(3, &f.ExtendedModel) stateSourceObject.Load(4, &f.ProcessorType) stateSourceObject.Load(5, &f.Family) stateSourceObject.Load(6, &f.Model) stateSourceObject.Load(7, &f.SteppingID) stateSourceObject.Load(8, &f.Caches) stateSourceObject.Load(9, &f.CacheLine) } func init() { state.Register((*Cache)(nil)) state.Register((*FeatureSet)(nil)) }