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
|
// automatically generated by stateify.
package shm
import (
"gvisor.dev/gvisor/pkg/state"
)
func (x *Registry) beforeSave() {}
func (x *Registry) save(m state.Map) {
x.beforeSave()
m.Save("userNS", &x.userNS)
m.Save("shms", &x.shms)
m.Save("keysToShms", &x.keysToShms)
m.Save("totalPages", &x.totalPages)
m.Save("lastIDUsed", &x.lastIDUsed)
}
func (x *Registry) afterLoad() {}
func (x *Registry) load(m state.Map) {
m.Load("userNS", &x.userNS)
m.Load("shms", &x.shms)
m.Load("keysToShms", &x.keysToShms)
m.Load("totalPages", &x.totalPages)
m.Load("lastIDUsed", &x.lastIDUsed)
}
func (x *Shm) beforeSave() {}
func (x *Shm) save(m state.Map) {
x.beforeSave()
m.Save("AtomicRefCount", &x.AtomicRefCount)
m.Save("mfp", &x.mfp)
m.Save("registry", &x.registry)
m.Save("ID", &x.ID)
m.Save("creator", &x.creator)
m.Save("size", &x.size)
m.Save("effectiveSize", &x.effectiveSize)
m.Save("fr", &x.fr)
m.Save("key", &x.key)
m.Save("perms", &x.perms)
m.Save("owner", &x.owner)
m.Save("attachTime", &x.attachTime)
m.Save("detachTime", &x.detachTime)
m.Save("changeTime", &x.changeTime)
m.Save("creatorPID", &x.creatorPID)
m.Save("lastAttachDetachPID", &x.lastAttachDetachPID)
m.Save("pendingDestruction", &x.pendingDestruction)
}
func (x *Shm) afterLoad() {}
func (x *Shm) load(m state.Map) {
m.Load("AtomicRefCount", &x.AtomicRefCount)
m.Load("mfp", &x.mfp)
m.Load("registry", &x.registry)
m.Load("ID", &x.ID)
m.Load("creator", &x.creator)
m.Load("size", &x.size)
m.Load("effectiveSize", &x.effectiveSize)
m.Load("fr", &x.fr)
m.Load("key", &x.key)
m.Load("perms", &x.perms)
m.Load("owner", &x.owner)
m.Load("attachTime", &x.attachTime)
m.Load("detachTime", &x.detachTime)
m.Load("changeTime", &x.changeTime)
m.Load("creatorPID", &x.creatorPID)
m.Load("lastAttachDetachPID", &x.lastAttachDetachPID)
m.Load("pendingDestruction", &x.pendingDestruction)
}
func init() {
state.Register("pkg/sentry/kernel/shm.Registry", (*Registry)(nil), state.Fns{Save: (*Registry).save, Load: (*Registry).load})
state.Register("pkg/sentry/kernel/shm.Shm", (*Shm)(nil), state.Fns{Save: (*Shm).save, Load: (*Shm).load})
}
|