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
124
|
// automatically generated by stateify.
package buffer
import (
"gvisor.dev/gvisor/pkg/state"
)
func (x *buffer) StateTypeName() string {
return "pkg/buffer.buffer"
}
func (x *buffer) StateFields() []string {
return []string{
"data",
"read",
"write",
"bufferEntry",
}
}
func (x *buffer) beforeSave() {}
func (x *buffer) StateSave(m state.Sink) {
x.beforeSave()
m.Save(0, &x.data)
m.Save(1, &x.read)
m.Save(2, &x.write)
m.Save(3, &x.bufferEntry)
}
func (x *buffer) afterLoad() {}
func (x *buffer) StateLoad(m state.Source) {
m.Load(0, &x.data)
m.Load(1, &x.read)
m.Load(2, &x.write)
m.Load(3, &x.bufferEntry)
}
func (x *bufferList) StateTypeName() string {
return "pkg/buffer.bufferList"
}
func (x *bufferList) StateFields() []string {
return []string{
"head",
"tail",
}
}
func (x *bufferList) beforeSave() {}
func (x *bufferList) StateSave(m state.Sink) {
x.beforeSave()
m.Save(0, &x.head)
m.Save(1, &x.tail)
}
func (x *bufferList) afterLoad() {}
func (x *bufferList) StateLoad(m state.Source) {
m.Load(0, &x.head)
m.Load(1, &x.tail)
}
func (x *bufferEntry) StateTypeName() string {
return "pkg/buffer.bufferEntry"
}
func (x *bufferEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
func (x *bufferEntry) beforeSave() {}
func (x *bufferEntry) StateSave(m state.Sink) {
x.beforeSave()
m.Save(0, &x.next)
m.Save(1, &x.prev)
}
func (x *bufferEntry) afterLoad() {}
func (x *bufferEntry) StateLoad(m state.Source) {
m.Load(0, &x.next)
m.Load(1, &x.prev)
}
func (x *View) StateTypeName() string {
return "pkg/buffer.View"
}
func (x *View) StateFields() []string {
return []string{
"data",
"size",
}
}
func (x *View) beforeSave() {}
func (x *View) StateSave(m state.Sink) {
x.beforeSave()
m.Save(0, &x.data)
m.Save(1, &x.size)
}
func (x *View) afterLoad() {}
func (x *View) StateLoad(m state.Source) {
m.Load(0, &x.data)
m.Load(1, &x.size)
}
func init() {
state.Register((*buffer)(nil))
state.Register((*bufferList)(nil))
state.Register((*bufferEntry)(nil))
state.Register((*View)(nil))
}
|