diff options
Diffstat (limited to 'pkg/sentry/fsimpl/timerfd')
-rw-r--r-- | pkg/sentry/fsimpl/timerfd/BUILD | 18 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go | 54 |
2 files changed, 54 insertions, 18 deletions
diff --git a/pkg/sentry/fsimpl/timerfd/BUILD b/pkg/sentry/fsimpl/timerfd/BUILD deleted file mode 100644 index 7ce7dc429..000000000 --- a/pkg/sentry/fsimpl/timerfd/BUILD +++ /dev/null @@ -1,18 +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/hostarch", - "//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..12970f25c --- /dev/null +++ b/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go @@ -0,0 +1,54 @@ +// automatically generated by stateify. + +package timerfd + +import ( + "gvisor.dev/gvisor/pkg/state" +) + +func (tfd *TimerFileDescription) StateTypeName() string { + return "pkg/sentry/fsimpl/timerfd.TimerFileDescription" +} + +func (tfd *TimerFileDescription) StateFields() []string { + return []string{ + "vfsfd", + "FileDescriptionDefaultImpl", + "DentryMetadataFileDescriptionImpl", + "NoLockFD", + "events", + "timer", + "val", + } +} + +func (tfd *TimerFileDescription) beforeSave() {} + +// +checklocksignore +func (tfd *TimerFileDescription) StateSave(stateSinkObject state.Sink) { + tfd.beforeSave() + stateSinkObject.Save(0, &tfd.vfsfd) + stateSinkObject.Save(1, &tfd.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &tfd.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &tfd.NoLockFD) + stateSinkObject.Save(4, &tfd.events) + stateSinkObject.Save(5, &tfd.timer) + stateSinkObject.Save(6, &tfd.val) +} + +func (tfd *TimerFileDescription) afterLoad() {} + +// +checklocksignore +func (tfd *TimerFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &tfd.vfsfd) + stateSourceObject.Load(1, &tfd.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &tfd.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &tfd.NoLockFD) + stateSourceObject.Load(4, &tfd.events) + stateSourceObject.Load(5, &tfd.timer) + stateSourceObject.Load(6, &tfd.val) +} + +func init() { + state.Register((*TimerFileDescription)(nil)) +} |