github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/cpuid/cpuid_arm64_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  //go:build arm64 && arm64 && arm64
     4  // +build arm64,arm64,arm64
     5  
     6  package cpuid
     7  
     8  import (
     9  	"github.com/ttpreport/gvisor-ligolo/pkg/state"
    10  )
    11  
    12  func (fs *FeatureSet) StateTypeName() string {
    13  	return "pkg/cpuid.FeatureSet"
    14  }
    15  
    16  func (fs *FeatureSet) StateFields() []string {
    17  	return []string{
    18  		"hwCap",
    19  		"cpuFreqMHz",
    20  		"cpuImplHex",
    21  		"cpuArchDec",
    22  		"cpuVarHex",
    23  		"cpuPartHex",
    24  		"cpuRevDec",
    25  	}
    26  }
    27  
    28  func (fs *FeatureSet) beforeSave() {}
    29  
    30  // +checklocksignore
    31  func (fs *FeatureSet) StateSave(stateSinkObject state.Sink) {
    32  	fs.beforeSave()
    33  	stateSinkObject.Save(0, &fs.hwCap)
    34  	stateSinkObject.Save(1, &fs.cpuFreqMHz)
    35  	stateSinkObject.Save(2, &fs.cpuImplHex)
    36  	stateSinkObject.Save(3, &fs.cpuArchDec)
    37  	stateSinkObject.Save(4, &fs.cpuVarHex)
    38  	stateSinkObject.Save(5, &fs.cpuPartHex)
    39  	stateSinkObject.Save(6, &fs.cpuRevDec)
    40  }
    41  
    42  func (fs *FeatureSet) afterLoad() {}
    43  
    44  // +checklocksignore
    45  func (fs *FeatureSet) StateLoad(stateSourceObject state.Source) {
    46  	stateSourceObject.Load(0, &fs.hwCap)
    47  	stateSourceObject.Load(1, &fs.cpuFreqMHz)
    48  	stateSourceObject.Load(2, &fs.cpuImplHex)
    49  	stateSourceObject.Load(3, &fs.cpuArchDec)
    50  	stateSourceObject.Load(4, &fs.cpuVarHex)
    51  	stateSourceObject.Load(5, &fs.cpuPartHex)
    52  	stateSourceObject.Load(6, &fs.cpuRevDec)
    53  }
    54  
    55  func init() {
    56  	state.Register((*FeatureSet)(nil))
    57  }