diff options
Diffstat (limited to 'pkg/sentry/fs/timerfd')
-rw-r--r-- | pkg/sentry/fs/timerfd/timerfd.go | 2 | ||||
-rw-r--r-- | pkg/sentry/fs/timerfd/timerfd_state_autogen.go | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/pkg/sentry/fs/timerfd/timerfd.go b/pkg/sentry/fs/timerfd/timerfd.go index 1c8518d71..ca8be8683 100644 --- a/pkg/sentry/fs/timerfd/timerfd.go +++ b/pkg/sentry/fs/timerfd/timerfd.go @@ -43,7 +43,7 @@ type TimerOperations struct { fsutil.FileNoopFlush `state:"nosave"` fsutil.FileUseInodeUnstableAttr `state:"nosave"` - events waiter.Queue `state:"zerovalue"` + events waiter.Queue timer *ktime.Timer // val is the number of timer expirations since the last successful call to diff --git a/pkg/sentry/fs/timerfd/timerfd_state_autogen.go b/pkg/sentry/fs/timerfd/timerfd_state_autogen.go index 822eecdd6..6cab87796 100644 --- a/pkg/sentry/fs/timerfd/timerfd_state_autogen.go +++ b/pkg/sentry/fs/timerfd/timerfd_state_autogen.go @@ -12,6 +12,7 @@ func (t *TimerOperations) StateTypeName() string { func (t *TimerOperations) StateFields() []string { return []string{ + "events", "timer", "val", } @@ -22,19 +23,18 @@ func (t *TimerOperations) beforeSave() {} // +checklocksignore func (t *TimerOperations) StateSave(stateSinkObject state.Sink) { t.beforeSave() - if !state.IsZeroValue(&t.events) { - state.Failf("events is %#v, expected zero", &t.events) - } - stateSinkObject.Save(0, &t.timer) - stateSinkObject.Save(1, &t.val) + stateSinkObject.Save(0, &t.events) + stateSinkObject.Save(1, &t.timer) + stateSinkObject.Save(2, &t.val) } func (t *TimerOperations) afterLoad() {} // +checklocksignore func (t *TimerOperations) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &t.timer) - stateSourceObject.Load(1, &t.val) + stateSourceObject.Load(0, &t.events) + stateSourceObject.Load(1, &t.timer) + stateSourceObject.Load(2, &t.val) } func init() { |