github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/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 "github.com/MerlinKodo/gvisor/pkg/state" 10 ) 11 12 func (s *State) StateTypeName() string { 13 return "pkg/sentry/platform/systrap/usertrap.State" 14 } 15 16 func (s *State) StateFields() []string { 17 return []string{ 18 "nextTrap", 19 "tableAddr", 20 } 21 } 22 23 func (s *State) beforeSave() {} 24 25 // +checklocksignore 26 func (s *State) StateSave(stateSinkObject state.Sink) { 27 s.beforeSave() 28 stateSinkObject.Save(0, &s.nextTrap) 29 stateSinkObject.Save(1, &s.tableAddr) 30 } 31 32 func (s *State) afterLoad() {} 33 34 // +checklocksignore 35 func (s *State) StateLoad(stateSourceObject state.Source) { 36 stateSourceObject.Load(0, &s.nextTrap) 37 stateSourceObject.Load(1, &s.tableAddr) 38 } 39 40 func init() { 41 state.Register((*State)(nil)) 42 }