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
|
// automatically generated by stateify.
package buffer
import (
"gvisor.dev/gvisor/pkg/state"
)
func (x *Buffer) beforeSave() {}
func (x *Buffer) save(m state.Map) {
x.beforeSave()
m.Save("data", &x.data)
m.Save("read", &x.read)
m.Save("write", &x.write)
m.Save("bufferEntry", &x.bufferEntry)
}
func (x *Buffer) afterLoad() {}
func (x *Buffer) load(m state.Map) {
m.Load("data", &x.data)
m.Load("read", &x.read)
m.Load("write", &x.write)
m.Load("bufferEntry", &x.bufferEntry)
}
func (x *bufferList) beforeSave() {}
func (x *bufferList) save(m state.Map) {
x.beforeSave()
m.Save("head", &x.head)
m.Save("tail", &x.tail)
}
func (x *bufferList) afterLoad() {}
func (x *bufferList) load(m state.Map) {
m.Load("head", &x.head)
m.Load("tail", &x.tail)
}
func (x *bufferEntry) beforeSave() {}
func (x *bufferEntry) save(m state.Map) {
x.beforeSave()
m.Save("next", &x.next)
m.Save("prev", &x.prev)
}
func (x *bufferEntry) afterLoad() {}
func (x *bufferEntry) load(m state.Map) {
m.Load("next", &x.next)
m.Load("prev", &x.prev)
}
func (x *View) beforeSave() {}
func (x *View) save(m state.Map) {
x.beforeSave()
m.Save("data", &x.data)
m.Save("size", &x.size)
}
func (x *View) afterLoad() {}
func (x *View) load(m state.Map) {
m.Load("data", &x.data)
m.Load("size", &x.size)
}
func init() {
state.Register("pkg/buffer.Buffer", (*Buffer)(nil), state.Fns{Save: (*Buffer).save, Load: (*Buffer).load})
state.Register("pkg/buffer.bufferList", (*bufferList)(nil), state.Fns{Save: (*bufferList).save, Load: (*bufferList).load})
state.Register("pkg/buffer.bufferEntry", (*bufferEntry)(nil), state.Fns{Save: (*bufferEntry).save, Load: (*bufferEntry).load})
state.Register("pkg/buffer.View", (*View)(nil), state.Fns{Save: (*View).save, Load: (*View).load})
}
|