github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/cpuid/cpuid_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package cpuid
     4  
     5  import (
     6  	"github.com/MerlinKodo/gvisor/pkg/state"
     7  )
     8  
     9  func (h *hwCap) StateTypeName() string {
    10  	return "pkg/cpuid.hwCap"
    11  }
    12  
    13  func (h *hwCap) StateFields() []string {
    14  	return []string{
    15  		"hwCap1",
    16  		"hwCap2",
    17  	}
    18  }
    19  
    20  func (h *hwCap) beforeSave() {}
    21  
    22  // +checklocksignore
    23  func (h *hwCap) StateSave(stateSinkObject state.Sink) {
    24  	h.beforeSave()
    25  	stateSinkObject.Save(0, &h.hwCap1)
    26  	stateSinkObject.Save(1, &h.hwCap2)
    27  }
    28  
    29  func (h *hwCap) afterLoad() {}
    30  
    31  // +checklocksignore
    32  func (h *hwCap) StateLoad(stateSourceObject state.Source) {
    33  	stateSourceObject.Load(0, &h.hwCap1)
    34  	stateSourceObject.Load(1, &h.hwCap2)
    35  }
    36  
    37  func init() {
    38  	state.Register((*hwCap)(nil))
    39  }