blob: d619cabd464655b57fa60244fd838c90291c86b3 (
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
|
// automatically generated by stateify.
package limits
import (
"gvisor.dev/gvisor/pkg/state"
)
func (l *Limit) StateTypeName() string {
return "pkg/sentry/limits.Limit"
}
func (l *Limit) StateFields() []string {
return []string{
"Cur",
"Max",
}
}
func (l *Limit) beforeSave() {}
func (l *Limit) StateSave(stateSinkObject state.Sink) {
l.beforeSave()
stateSinkObject.Save(0, &l.Cur)
stateSinkObject.Save(1, &l.Max)
}
func (l *Limit) afterLoad() {}
func (l *Limit) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &l.Cur)
stateSourceObject.Load(1, &l.Max)
}
func (l *LimitSet) StateTypeName() string {
return "pkg/sentry/limits.LimitSet"
}
func (l *LimitSet) StateFields() []string {
return []string{
"data",
}
}
func (l *LimitSet) beforeSave() {}
func (l *LimitSet) StateSave(stateSinkObject state.Sink) {
l.beforeSave()
stateSinkObject.Save(0, &l.data)
}
func (l *LimitSet) afterLoad() {}
func (l *LimitSet) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &l.data)
}
func init() {
state.Register((*Limit)(nil))
state.Register((*LimitSet)(nil))
}
|