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