diff options
Diffstat (limited to 'pkg/sentry/fsimpl/timerfd')
-rw-r--r-- | pkg/sentry/fsimpl/timerfd/BUILD | 17 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go | 52 |
2 files changed, 52 insertions, 17 deletions
diff --git a/pkg/sentry/fsimpl/timerfd/BUILD b/pkg/sentry/fsimpl/timerfd/BUILD deleted file mode 100644 index fbb02a271..000000000 --- a/pkg/sentry/fsimpl/timerfd/BUILD +++ /dev/null @@ -1,17 +0,0 @@ -load("//tools:defs.bzl", "go_library") - -licenses(["notice"]) - -go_library( - name = "timerfd", - srcs = ["timerfd.go"], - visibility = ["//pkg/sentry:internal"], - deps = [ - "//pkg/context", - "//pkg/sentry/kernel/time", - "//pkg/sentry/vfs", - "//pkg/syserror", - "//pkg/usermem", - "//pkg/waiter", - ], -) diff --git a/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go b/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go new file mode 100644 index 000000000..0bfca83b9 --- /dev/null +++ b/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go @@ -0,0 +1,52 @@ +// automatically generated by stateify. + +package timerfd + +import ( + "gvisor.dev/gvisor/pkg/state" +) + +func (t *TimerFileDescription) StateTypeName() string { + return "pkg/sentry/fsimpl/timerfd.TimerFileDescription" +} + +func (t *TimerFileDescription) StateFields() []string { + return []string{ + "vfsfd", + "FileDescriptionDefaultImpl", + "DentryMetadataFileDescriptionImpl", + "NoLockFD", + "events", + "timer", + "val", + } +} + +func (t *TimerFileDescription) beforeSave() {} + +func (t *TimerFileDescription) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.vfsfd) + stateSinkObject.Save(1, &t.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &t.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &t.NoLockFD) + stateSinkObject.Save(4, &t.events) + stateSinkObject.Save(5, &t.timer) + stateSinkObject.Save(6, &t.val) +} + +func (t *TimerFileDescription) afterLoad() {} + +func (t *TimerFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.vfsfd) + stateSourceObject.Load(1, &t.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &t.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &t.NoLockFD) + stateSourceObject.Load(4, &t.events) + stateSourceObject.Load(5, &t.timer) + stateSourceObject.Load(6, &t.val) +} + +func init() { + state.Register((*TimerFileDescription)(nil)) +} |