github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/sentry/kernel/fasync/fasync_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package fasync 4 5 import ( 6 "github.com/MerlinKodo/gvisor/pkg/state" 7 ) 8 9 func (a *FileAsync) StateTypeName() string { 10 return "pkg/sentry/kernel/fasync.FileAsync" 11 } 12 13 func (a *FileAsync) StateFields() []string { 14 return []string{ 15 "e", 16 "fd", 17 "requester", 18 "registered", 19 "signal", 20 "recipientPG", 21 "recipientTG", 22 "recipientT", 23 } 24 } 25 26 func (a *FileAsync) beforeSave() {} 27 28 // +checklocksignore 29 func (a *FileAsync) StateSave(stateSinkObject state.Sink) { 30 a.beforeSave() 31 stateSinkObject.Save(0, &a.e) 32 stateSinkObject.Save(1, &a.fd) 33 stateSinkObject.Save(2, &a.requester) 34 stateSinkObject.Save(3, &a.registered) 35 stateSinkObject.Save(4, &a.signal) 36 stateSinkObject.Save(5, &a.recipientPG) 37 stateSinkObject.Save(6, &a.recipientTG) 38 stateSinkObject.Save(7, &a.recipientT) 39 } 40 41 func (a *FileAsync) afterLoad() {} 42 43 // +checklocksignore 44 func (a *FileAsync) StateLoad(stateSourceObject state.Source) { 45 stateSourceObject.Load(0, &a.e) 46 stateSourceObject.Load(1, &a.fd) 47 stateSourceObject.Load(2, &a.requester) 48 stateSourceObject.Load(3, &a.registered) 49 stateSourceObject.Load(4, &a.signal) 50 stateSourceObject.Load(5, &a.recipientPG) 51 stateSourceObject.Load(6, &a.recipientTG) 52 stateSourceObject.Load(7, &a.recipientT) 53 } 54 55 func init() { 56 state.Register((*FileAsync)(nil)) 57 }