github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/sentry/arch/arch_x86_impl_state_autogen.go (about)

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