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