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
|
// automatically generated by stateify.
package lock
import (
"gvisor.dev/gvisor/pkg/state"
)
func (x *Lock) beforeSave() {}
func (x *Lock) save(m state.Map) {
x.beforeSave()
m.Save("Readers", &x.Readers)
m.Save("HasWriter", &x.HasWriter)
m.Save("Writer", &x.Writer)
}
func (x *Lock) afterLoad() {}
func (x *Lock) load(m state.Map) {
m.Load("Readers", &x.Readers)
m.Load("HasWriter", &x.HasWriter)
m.Load("Writer", &x.Writer)
}
func (x *Locks) beforeSave() {}
func (x *Locks) save(m state.Map) {
x.beforeSave()
if !state.IsZeroValue(x.blockedQueue) {
m.Failf("blockedQueue is %v, expected zero", x.blockedQueue)
}
m.Save("locks", &x.locks)
}
func (x *Locks) afterLoad() {}
func (x *Locks) load(m state.Map) {
m.Load("locks", &x.locks)
}
func (x *LockRange) beforeSave() {}
func (x *LockRange) save(m state.Map) {
x.beforeSave()
m.Save("Start", &x.Start)
m.Save("End", &x.End)
}
func (x *LockRange) afterLoad() {}
func (x *LockRange) load(m state.Map) {
m.Load("Start", &x.Start)
m.Load("End", &x.End)
}
func (x *LockSet) beforeSave() {}
func (x *LockSet) save(m state.Map) {
x.beforeSave()
var root *LockSegmentDataSlices = x.saveRoot()
m.SaveValue("root", root)
}
func (x *LockSet) afterLoad() {}
func (x *LockSet) load(m state.Map) {
m.LoadValue("root", new(*LockSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*LockSegmentDataSlices)) })
}
func (x *Locknode) beforeSave() {}
func (x *Locknode) 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 *Locknode) afterLoad() {}
func (x *Locknode) 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 *LockSegmentDataSlices) beforeSave() {}
func (x *LockSegmentDataSlices) save(m state.Map) {
x.beforeSave()
m.Save("Start", &x.Start)
m.Save("End", &x.End)
m.Save("Values", &x.Values)
}
func (x *LockSegmentDataSlices) afterLoad() {}
func (x *LockSegmentDataSlices) load(m state.Map) {
m.Load("Start", &x.Start)
m.Load("End", &x.End)
m.Load("Values", &x.Values)
}
func init() {
state.Register("lock.Lock", (*Lock)(nil), state.Fns{Save: (*Lock).save, Load: (*Lock).load})
state.Register("lock.Locks", (*Locks)(nil), state.Fns{Save: (*Locks).save, Load: (*Locks).load})
state.Register("lock.LockRange", (*LockRange)(nil), state.Fns{Save: (*LockRange).save, Load: (*LockRange).load})
state.Register("lock.LockSet", (*LockSet)(nil), state.Fns{Save: (*LockSet).save, Load: (*LockSet).load})
state.Register("lock.Locknode", (*Locknode)(nil), state.Fns{Save: (*Locknode).save, Load: (*Locknode).load})
state.Register("lock.LockSegmentDataSlices", (*LockSegmentDataSlices)(nil), state.Fns{Save: (*LockSegmentDataSlices).save, Load: (*LockSegmentDataSlices).load})
}
|