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