summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/fasync/fasync_state_autogen.go
blob: 6ddebc7bbf669d3b3619e7aebd8947fc17d4b4d5 (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
// automatically generated by stateify.

package fasync

import (
	"gvisor.dev/gvisor/pkg/state"
)

func (a *FileAsync) StateTypeName() string {
	return "pkg/sentry/kernel/fasync.FileAsync"
}

func (a *FileAsync) StateFields() []string {
	return []string{
		"e",
		"fd",
		"requester",
		"registered",
		"signal",
		"recipientPG",
		"recipientTG",
		"recipientT",
	}
}

func (a *FileAsync) beforeSave() {}

func (a *FileAsync) StateSave(stateSinkObject state.Sink) {
	a.beforeSave()
	stateSinkObject.Save(0, &a.e)
	stateSinkObject.Save(1, &a.fd)
	stateSinkObject.Save(2, &a.requester)
	stateSinkObject.Save(3, &a.registered)
	stateSinkObject.Save(4, &a.signal)
	stateSinkObject.Save(5, &a.recipientPG)
	stateSinkObject.Save(6, &a.recipientTG)
	stateSinkObject.Save(7, &a.recipientT)
}

func (a *FileAsync) afterLoad() {}

func (a *FileAsync) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &a.e)
	stateSourceObject.Load(1, &a.fd)
	stateSourceObject.Load(2, &a.requester)
	stateSourceObject.Load(3, &a.registered)
	stateSourceObject.Load(4, &a.signal)
	stateSourceObject.Load(5, &a.recipientPG)
	stateSourceObject.Load(6, &a.recipientTG)
	stateSourceObject.Load(7, &a.recipientT)
}

func init() {
	state.Register((*FileAsync)(nil))
}