github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/sentry/arch/arch_x86_state_autogen.go (about)

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