blob: edcc2bee5da25da2ab76b6a01d16c14368ed0547 (
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
|
// automatically generated by stateify.
//go:build (amd64 || 386) && go1.1
// +build amd64 386
// +build go1.1
package arch
import (
"gvisor.dev/gvisor/pkg/state"
)
func (s *State) StateTypeName() string {
return "pkg/sentry/arch.State"
}
func (s *State) StateFields() []string {
return []string{
"Regs",
"fpState",
"FeatureSet",
}
}
func (s *State) beforeSave() {}
// +checklocksignore
func (s *State) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
stateSinkObject.Save(0, &s.Regs)
stateSinkObject.Save(1, &s.fpState)
stateSinkObject.Save(2, &s.FeatureSet)
}
// +checklocksignore
func (s *State) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &s.Regs)
stateSourceObject.LoadWait(1, &s.fpState)
stateSourceObject.Load(2, &s.FeatureSet)
stateSourceObject.AfterLoad(s.afterLoad)
}
func init() {
state.Register((*State)(nil))
}
|