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