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