summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/timerfd/timerfd_state_autogen.go
blob: 15f2d63f6fcb75c5d77e340a557bf0cc33654fec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// automatically generated by stateify.

package timerfd

import (
	"gvisor.dev/gvisor/pkg/state"
)

func (t *TimerOperations) StateTypeName() string {
	return "pkg/sentry/fs/timerfd.TimerOperations"
}

func (t *TimerOperations) StateFields() []string {
	return []string{
		"timer",
		"val",
	}
}

func (t *TimerOperations) beforeSave() {}

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)
}

func (t *TimerOperations) afterLoad() {}

func (t *TimerOperations) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &t.timer)
	stateSourceObject.Load(1, &t.val)
}

func init() {
	state.Register((*TimerOperations)(nil))
}