summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/timerfd
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-06-24 06:37:35 +0000
committergVisor bot <gvisor-bot@google.com>2020-06-24 06:37:35 +0000
commit9183888b520beeee8609170819a28bea89202909 (patch)
tree3cdcfa4de9ced4c539ab7c57e4cf58ffea980f6c /pkg/sentry/fs/timerfd
parentcab13958a54419262aba2a0cd7f1075ed02c8ee0 (diff)
parent364ac92baf83f2352f78b718090472639bd92a76 (diff)
Merge release-20200608.0-119-g364ac92ba (automated)
Diffstat (limited to 'pkg/sentry/fs/timerfd')
-rw-r--r--pkg/sentry/fs/timerfd/timerfd_state_autogen.go29
1 files changed, 21 insertions, 8 deletions
diff --git a/pkg/sentry/fs/timerfd/timerfd_state_autogen.go b/pkg/sentry/fs/timerfd/timerfd_state_autogen.go
index 955cf1d38..2a411ceab 100644
--- a/pkg/sentry/fs/timerfd/timerfd_state_autogen.go
+++ b/pkg/sentry/fs/timerfd/timerfd_state_autogen.go
@@ -6,22 +6,35 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
+func (x *TimerOperations) StateTypeName() string {
+ return "pkg/sentry/fs/timerfd.TimerOperations"
+}
+
+func (x *TimerOperations) StateFields() []string {
+ return []string{
+ "timer",
+ "val",
+ }
+}
+
func (x *TimerOperations) beforeSave() {}
-func (x *TimerOperations) save(m state.Map) {
+
+func (x *TimerOperations) StateSave(m state.Sink) {
x.beforeSave()
if !state.IsZeroValue(&x.events) {
- m.Failf("events is %#v, expected zero", &x.events)
+ state.Failf("events is %#v, expected zero", &x.events)
}
- m.Save("timer", &x.timer)
- m.Save("val", &x.val)
+ m.Save(0, &x.timer)
+ m.Save(1, &x.val)
}
func (x *TimerOperations) afterLoad() {}
-func (x *TimerOperations) load(m state.Map) {
- m.Load("timer", &x.timer)
- m.Load("val", &x.val)
+
+func (x *TimerOperations) StateLoad(m state.Source) {
+ m.Load(0, &x.timer)
+ m.Load(1, &x.val)
}
func init() {
- state.Register("pkg/sentry/fs/timerfd.TimerOperations", (*TimerOperations)(nil), state.Fns{Save: (*TimerOperations).save, Load: (*TimerOperations).load})
+ state.Register((*TimerOperations)(nil))
}