github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/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 "context" 11 12 "github.com/metacubex/gvisor/pkg/state" 13 ) 14 15 func (r *Registers) StateTypeName() string { 16 return "pkg/sentry/arch.Registers" 17 } 18 19 func (r *Registers) StateFields() []string { 20 return []string{ 21 "PtraceRegs", 22 } 23 } 24 25 func (r *Registers) beforeSave() {} 26 27 // +checklocksignore 28 func (r *Registers) StateSave(stateSinkObject state.Sink) { 29 r.beforeSave() 30 stateSinkObject.Save(0, &r.PtraceRegs) 31 } 32 33 func (r *Registers) afterLoad(context.Context) {} 34 35 // +checklocksignore 36 func (r *Registers) StateLoad(ctx context.Context, stateSourceObject state.Source) { 37 stateSourceObject.Load(0, &r.PtraceRegs) 38 } 39 40 func init() { 41 state.Register((*Registers)(nil)) 42 }