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
|
// automatically generated by stateify.
package usermem
import (
"gvisor.dev/gvisor/pkg/state"
)
func (x *AccessType) StateTypeName() string {
return "pkg/usermem.AccessType"
}
func (x *AccessType) StateFields() []string {
return []string{
"Read",
"Write",
"Execute",
}
}
func (x *AccessType) beforeSave() {}
func (x *AccessType) StateSave(m state.Sink) {
x.beforeSave()
m.Save(0, &x.Read)
m.Save(1, &x.Write)
m.Save(2, &x.Execute)
}
func (x *AccessType) afterLoad() {}
func (x *AccessType) StateLoad(m state.Source) {
m.Load(0, &x.Read)
m.Load(1, &x.Write)
m.Load(2, &x.Execute)
}
func (x *Addr) StateTypeName() string {
return "pkg/usermem.Addr"
}
func (x *Addr) StateFields() []string {
return nil
}
func (x *AddrRange) StateTypeName() string {
return "pkg/usermem.AddrRange"
}
func (x *AddrRange) StateFields() []string {
return []string{
"Start",
"End",
}
}
func (x *AddrRange) beforeSave() {}
func (x *AddrRange) StateSave(m state.Sink) {
x.beforeSave()
m.Save(0, &x.Start)
m.Save(1, &x.End)
}
func (x *AddrRange) afterLoad() {}
func (x *AddrRange) StateLoad(m state.Source) {
m.Load(0, &x.Start)
m.Load(1, &x.End)
}
func init() {
state.Register((*AccessType)(nil))
state.Register((*Addr)(nil))
state.Register((*AddrRange)(nil))
}
|