summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go
blob: d3c01e9e7bf6eb15fe4ddfcf9c7e47e3aea46c73 (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
41
42
43
44
45
46
47
48
49
50
51
52
// 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() {}

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

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