summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/memmap/memmap_state_autogen.go
blob: 55ccf8cfda38c90b6e7fb16b417ba24edd9f1c69 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// automatically generated by stateify.

package memmap

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

func (f *FileRange) StateTypeName() string {
	return "pkg/sentry/memmap.FileRange"
}

func (f *FileRange) StateFields() []string {
	return []string{
		"Start",
		"End",
	}
}

func (f *FileRange) beforeSave() {}

func (f *FileRange) StateSave(stateSinkObject state.Sink) {
	f.beforeSave()
	stateSinkObject.Save(0, &f.Start)
	stateSinkObject.Save(1, &f.End)
}

func (f *FileRange) afterLoad() {}

func (f *FileRange) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &f.Start)
	stateSourceObject.Load(1, &f.End)
}

func (m *MappableRange) StateTypeName() string {
	return "pkg/sentry/memmap.MappableRange"
}

func (m *MappableRange) StateFields() []string {
	return []string{
		"Start",
		"End",
	}
}

func (m *MappableRange) beforeSave() {}

func (m *MappableRange) StateSave(stateSinkObject state.Sink) {
	m.beforeSave()
	stateSinkObject.Save(0, &m.Start)
	stateSinkObject.Save(1, &m.End)
}

func (m *MappableRange) afterLoad() {}

func (m *MappableRange) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &m.Start)
	stateSourceObject.Load(1, &m.End)
}

func (m *MappingOfRange) StateTypeName() string {
	return "pkg/sentry/memmap.MappingOfRange"
}

func (m *MappingOfRange) StateFields() []string {
	return []string{
		"MappingSpace",
		"AddrRange",
		"Writable",
	}
}

func (m *MappingOfRange) beforeSave() {}

func (m *MappingOfRange) StateSave(stateSinkObject state.Sink) {
	m.beforeSave()
	stateSinkObject.Save(0, &m.MappingSpace)
	stateSinkObject.Save(1, &m.AddrRange)
	stateSinkObject.Save(2, &m.Writable)
}

func (m *MappingOfRange) afterLoad() {}

func (m *MappingOfRange) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &m.MappingSpace)
	stateSourceObject.Load(1, &m.AddrRange)
	stateSourceObject.Load(2, &m.Writable)
}

func init() {
	state.Register((*FileRange)(nil))
	state.Register((*MappableRange)(nil))
	state.Register((*MappingOfRange)(nil))
}