// automatically generated by stateify. package epoll import ( "gvisor.dev/gvisor/pkg/state" ) func (f *FileIdentifier) StateTypeName() string { return "pkg/sentry/kernel/epoll.FileIdentifier" } func (f *FileIdentifier) StateFields() []string { return []string{ "File", "Fd", } } func (f *FileIdentifier) beforeSave() {} func (f *FileIdentifier) StateSave(stateSinkObject state.Sink) { f.beforeSave() stateSinkObject.Save(0, &f.File) stateSinkObject.Save(1, &f.Fd) } func (f *FileIdentifier) afterLoad() {} func (f *FileIdentifier) StateLoad(stateSourceObject state.Source) { stateSourceObject.LoadWait(0, &f.File) stateSourceObject.Load(1, &f.Fd) } func (p *pollEntry) StateTypeName() string { return "pkg/sentry/kernel/epoll.pollEntry" } func (p *pollEntry) StateFields() []string { return []string{ "pollEntryEntry", "id", "userData", "mask", "flags", "epoll", } } func (p *pollEntry) beforeSave() {} func (p *pollEntry) StateSave(stateSinkObject state.Sink) { p.beforeSave() stateSinkObject.Save(0, &p.pollEntryEntry) stateSinkObject.Save(1, &p.id) stateSinkObject.Save(2, &p.userData) stateSinkObject.Save(3, &p.mask) stateSinkObject.Save(4, &p.flags) stateSinkObject.Save(5, &p.epoll) } func (p *pollEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &p.pollEntryEntry) stateSourceObject.LoadWait(1, &p.id) stateSourceObject.Load(2, &p.userData) stateSourceObject.Load(3, &p.mask) stateSourceObject.Load(4, &p.flags) stateSourceObject.Load(5, &p.epoll) stateSourceObject.AfterLoad(p.afterLoad) } func (e *EventPoll) StateTypeName() string { return "pkg/sentry/kernel/epoll.EventPoll" } func (e *EventPoll) StateFields() []string { return []string{ "files", "readyList", "waitingList", "disabledList", } } func (e *EventPoll) beforeSave() {} func (e *EventPoll) StateSave(stateSinkObject state.Sink) { e.beforeSave() if !state.IsZeroValue(&e.FilePipeSeek) { state.Failf("FilePipeSeek is %#v, expected zero", &e.FilePipeSeek) } if !state.IsZeroValue(&e.FileNotDirReaddir) { state.Failf("FileNotDirReaddir is %#v, expected zero", &e.FileNotDirReaddir) } if !state.IsZeroValue(&e.FileNoFsync) { state.Failf("FileNoFsync is %#v, expected zero", &e.FileNoFsync) } if !state.IsZeroValue(&e.FileNoopFlush) { state.Failf("FileNoopFlush is %#v, expected zero", &e.FileNoopFlush) } if !state.IsZeroValue(&e.FileNoIoctl) { state.Failf("FileNoIoctl is %#v, expected zero", &e.FileNoIoctl) } if !state.IsZeroValue(&e.FileNoMMap) { state.Failf("FileNoMMap is %#v, expected zero", &e.FileNoMMap) } if !state.IsZeroValue(&e.Queue) { state.Failf("Queue is %#v, expected zero", &e.Queue) } stateSinkObject.Save(0, &e.files) stateSinkObject.Save(1, &e.readyList) stateSinkObject.Save(2, &e.waitingList) stateSinkObject.Save(3, &e.disabledList) } func (e *EventPoll) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.files) stateSourceObject.Load(1, &e.readyList) stateSourceObject.Load(2, &e.waitingList) stateSourceObject.Load(3, &e.disabledList) stateSourceObject.AfterLoad(e.afterLoad) } func (l *pollEntryList) StateTypeName() string { return "pkg/sentry/kernel/epoll.pollEntryList" } func (l *pollEntryList) StateFields() []string { return []string{ "head", "tail", } } func (l *pollEntryList) beforeSave() {} func (l *pollEntryList) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.head) stateSinkObject.Save(1, &l.tail) } func (l *pollEntryList) afterLoad() {} func (l *pollEntryList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.head) stateSourceObject.Load(1, &l.tail) } func (e *pollEntryEntry) StateTypeName() string { return "pkg/sentry/kernel/epoll.pollEntryEntry" } func (e *pollEntryEntry) StateFields() []string { return []string{ "next", "prev", } } func (e *pollEntryEntry) beforeSave() {} func (e *pollEntryEntry) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.next) stateSinkObject.Save(1, &e.prev) } func (e *pollEntryEntry) afterLoad() {} func (e *pollEntryEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.next) stateSourceObject.Load(1, &e.prev) } func init() { state.Register((*FileIdentifier)(nil)) state.Register((*pollEntry)(nil)) state.Register((*EventPoll)(nil)) state.Register((*pollEntryList)(nil)) state.Register((*pollEntryEntry)(nil)) }