github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/pkg/sentry/arch/arch_amd64_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 //go:build amd64 && amd64 && amd64 4 // +build amd64,amd64,amd64 5 6 package arch 7 8 import ( 9 "context" 10 11 "github.com/metacubex/gvisor/pkg/state" 12 ) 13 14 func (c *Context64) StateTypeName() string { 15 return "pkg/sentry/arch.Context64" 16 } 17 18 func (c *Context64) StateFields() []string { 19 return []string{ 20 "State", 21 } 22 } 23 24 func (c *Context64) beforeSave() {} 25 26 // +checklocksignore 27 func (c *Context64) StateSave(stateSinkObject state.Sink) { 28 c.beforeSave() 29 stateSinkObject.Save(0, &c.State) 30 } 31 32 func (c *Context64) afterLoad(context.Context) {} 33 34 // +checklocksignore 35 func (c *Context64) StateLoad(ctx context.Context, stateSourceObject state.Source) { 36 stateSourceObject.Load(0, &c.State) 37 } 38 39 func init() { 40 state.Register((*Context64)(nil)) 41 }