github.com/sagernet/gvisor@v0.0.0-20240428053021-e691de28565f/pkg/abi/linux/linux_arm64_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  //go:build arm64 && arm64 && arm64 && arm64 && arm64
     4  // +build arm64,arm64,arm64,arm64,arm64
     5  
     6  package linux
     7  
     8  import (
     9  	"context"
    10  
    11  	"github.com/sagernet/gvisor/pkg/state"
    12  )
    13  
    14  func (p *PtraceRegs) StateTypeName() string {
    15  	return "pkg/abi/linux.PtraceRegs"
    16  }
    17  
    18  func (p *PtraceRegs) StateFields() []string {
    19  	return []string{
    20  		"Regs",
    21  		"Sp",
    22  		"Pc",
    23  		"Pstate",
    24  	}
    25  }
    26  
    27  func (p *PtraceRegs) beforeSave() {}
    28  
    29  // +checklocksignore
    30  func (p *PtraceRegs) StateSave(stateSinkObject state.Sink) {
    31  	p.beforeSave()
    32  	stateSinkObject.Save(0, &p.Regs)
    33  	stateSinkObject.Save(1, &p.Sp)
    34  	stateSinkObject.Save(2, &p.Pc)
    35  	stateSinkObject.Save(3, &p.Pstate)
    36  }
    37  
    38  func (p *PtraceRegs) afterLoad(context.Context) {}
    39  
    40  // +checklocksignore
    41  func (p *PtraceRegs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    42  	stateSourceObject.Load(0, &p.Regs)
    43  	stateSourceObject.Load(1, &p.Sp)
    44  	stateSourceObject.Load(2, &p.Pc)
    45  	stateSourceObject.Load(3, &p.Pstate)
    46  }
    47  
    48  func init() {
    49  	state.Register((*PtraceRegs)(nil))
    50  }