summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/ashmem/ashmem_state_autogen.go
blob: 13defb0334a7d946cc35d9e0187e7a8e6dce6598 (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// automatically generated by stateify.

package ashmem

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

func (x *Area) beforeSave() {}
func (x *Area) save(m state.Map) {
	x.beforeSave()
	m.Save("ad", &x.ad)
	m.Save("tmpfsFile", &x.tmpfsFile)
	m.Save("name", &x.name)
	m.Save("size", &x.size)
	m.Save("perms", &x.perms)
	m.Save("pb", &x.pb)
}

func (x *Area) afterLoad() {}
func (x *Area) load(m state.Map) {
	m.Load("ad", &x.ad)
	m.Load("tmpfsFile", &x.tmpfsFile)
	m.Load("name", &x.name)
	m.Load("size", &x.size)
	m.Load("perms", &x.perms)
	m.Load("pb", &x.pb)
}

func (x *Device) beforeSave() {}
func (x *Device) save(m state.Map) {
	x.beforeSave()
	m.Save("InodeSimpleAttributes", &x.InodeSimpleAttributes)
}

func (x *Device) afterLoad() {}
func (x *Device) load(m state.Map) {
	m.Load("InodeSimpleAttributes", &x.InodeSimpleAttributes)
}

func (x *PinBoard) beforeSave() {}
func (x *PinBoard) save(m state.Map) {
	x.beforeSave()
	m.Save("Set", &x.Set)
}

func (x *PinBoard) afterLoad() {}
func (x *PinBoard) load(m state.Map) {
	m.Load("Set", &x.Set)
}

func (x *Range) beforeSave() {}
func (x *Range) save(m state.Map) {
	x.beforeSave()
	m.Save("Start", &x.Start)
	m.Save("End", &x.End)
}

func (x *Range) afterLoad() {}
func (x *Range) load(m state.Map) {
	m.Load("Start", &x.Start)
	m.Load("End", &x.End)
}

func (x *Set) beforeSave() {}
func (x *Set) save(m state.Map) {
	x.beforeSave()
	var root *SegmentDataSlices = x.saveRoot()
	m.SaveValue("root", root)
}

func (x *Set) afterLoad() {}
func (x *Set) load(m state.Map) {
	m.LoadValue("root", new(*SegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*SegmentDataSlices)) })
}

func (x *node) beforeSave() {}
func (x *node) save(m state.Map) {
	x.beforeSave()
	m.Save("nrSegments", &x.nrSegments)
	m.Save("parent", &x.parent)
	m.Save("parentIndex", &x.parentIndex)
	m.Save("hasChildren", &x.hasChildren)
	m.Save("keys", &x.keys)
	m.Save("values", &x.values)
	m.Save("children", &x.children)
}

func (x *node) afterLoad() {}
func (x *node) load(m state.Map) {
	m.Load("nrSegments", &x.nrSegments)
	m.Load("parent", &x.parent)
	m.Load("parentIndex", &x.parentIndex)
	m.Load("hasChildren", &x.hasChildren)
	m.Load("keys", &x.keys)
	m.Load("values", &x.values)
	m.Load("children", &x.children)
}

func (x *SegmentDataSlices) beforeSave() {}
func (x *SegmentDataSlices) save(m state.Map) {
	x.beforeSave()
	m.Save("Start", &x.Start)
	m.Save("End", &x.End)
	m.Save("Values", &x.Values)
}

func (x *SegmentDataSlices) afterLoad() {}
func (x *SegmentDataSlices) load(m state.Map) {
	m.Load("Start", &x.Start)
	m.Load("End", &x.End)
	m.Load("Values", &x.Values)
}

func init() {
	state.Register("ashmem.Area", (*Area)(nil), state.Fns{Save: (*Area).save, Load: (*Area).load})
	state.Register("ashmem.Device", (*Device)(nil), state.Fns{Save: (*Device).save, Load: (*Device).load})
	state.Register("ashmem.PinBoard", (*PinBoard)(nil), state.Fns{Save: (*PinBoard).save, Load: (*PinBoard).load})
	state.Register("ashmem.Range", (*Range)(nil), state.Fns{Save: (*Range).save, Load: (*Range).load})
	state.Register("ashmem.Set", (*Set)(nil), state.Fns{Save: (*Set).save, Load: (*Set).load})
	state.Register("ashmem.node", (*node)(nil), state.Fns{Save: (*node).save, Load: (*node).load})
	state.Register("ashmem.SegmentDataSlices", (*SegmentDataSlices)(nil), state.Fns{Save: (*SegmentDataSlices).save, Load: (*SegmentDataSlices).load})
}