summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/pipe/pipe_state_autogen.go
blob: 095d2e7138c10372cd37ed09d0bd43309df2b42b (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// automatically generated by stateify.

package pipe

import (
	"gvisor.googlesource.com/gvisor/pkg/state"
)

func (x *buffer) beforeSave() {}
func (x *buffer) save(m state.Map) {
	x.beforeSave()
	m.Save("data", &x.data)
	m.Save("read", &x.read)
	m.Save("write", &x.write)
	m.Save("bufferEntry", &x.bufferEntry)
}

func (x *buffer) afterLoad() {}
func (x *buffer) load(m state.Map) {
	m.Load("data", &x.data)
	m.Load("read", &x.read)
	m.Load("write", &x.write)
	m.Load("bufferEntry", &x.bufferEntry)
}

func (x *bufferList) beforeSave() {}
func (x *bufferList) save(m state.Map) {
	x.beforeSave()
	m.Save("head", &x.head)
	m.Save("tail", &x.tail)
}

func (x *bufferList) afterLoad() {}
func (x *bufferList) load(m state.Map) {
	m.Load("head", &x.head)
	m.Load("tail", &x.tail)
}

func (x *bufferEntry) beforeSave() {}
func (x *bufferEntry) save(m state.Map) {
	x.beforeSave()
	m.Save("next", &x.next)
	m.Save("prev", &x.prev)
}

func (x *bufferEntry) afterLoad() {}
func (x *bufferEntry) load(m state.Map) {
	m.Load("next", &x.next)
	m.Load("prev", &x.prev)
}

func (x *inodeOperations) beforeSave() {}
func (x *inodeOperations) save(m state.Map) {
	x.beforeSave()
	m.Save("InodeSimpleAttributes", &x.InodeSimpleAttributes)
	m.Save("p", &x.p)
}

func (x *inodeOperations) afterLoad() {}
func (x *inodeOperations) load(m state.Map) {
	m.Load("InodeSimpleAttributes", &x.InodeSimpleAttributes)
	m.Load("p", &x.p)
}

func (x *Pipe) beforeSave() {}
func (x *Pipe) save(m state.Map) {
	x.beforeSave()
	m.Save("isNamed", &x.isNamed)
	m.Save("atomicIOBytes", &x.atomicIOBytes)
	m.Save("readers", &x.readers)
	m.Save("writers", &x.writers)
	m.Save("data", &x.data)
	m.Save("max", &x.max)
	m.Save("size", &x.size)
	m.Save("hadWriter", &x.hadWriter)
}

func (x *Pipe) afterLoad() {}
func (x *Pipe) load(m state.Map) {
	m.Load("isNamed", &x.isNamed)
	m.Load("atomicIOBytes", &x.atomicIOBytes)
	m.Load("readers", &x.readers)
	m.Load("writers", &x.writers)
	m.Load("data", &x.data)
	m.Load("max", &x.max)
	m.Load("size", &x.size)
	m.Load("hadWriter", &x.hadWriter)
}

func (x *Reader) beforeSave() {}
func (x *Reader) save(m state.Map) {
	x.beforeSave()
	m.Save("ReaderWriter", &x.ReaderWriter)
}

func (x *Reader) afterLoad() {}
func (x *Reader) load(m state.Map) {
	m.Load("ReaderWriter", &x.ReaderWriter)
}

func (x *ReaderWriter) beforeSave() {}
func (x *ReaderWriter) save(m state.Map) {
	x.beforeSave()
	m.Save("Pipe", &x.Pipe)
}

func (x *ReaderWriter) afterLoad() {}
func (x *ReaderWriter) load(m state.Map) {
	m.Load("Pipe", &x.Pipe)
}

func (x *Writer) beforeSave() {}
func (x *Writer) save(m state.Map) {
	x.beforeSave()
	m.Save("ReaderWriter", &x.ReaderWriter)
}

func (x *Writer) afterLoad() {}
func (x *Writer) load(m state.Map) {
	m.Load("ReaderWriter", &x.ReaderWriter)
}

func init() {
	state.Register("pipe.buffer", (*buffer)(nil), state.Fns{Save: (*buffer).save, Load: (*buffer).load})
	state.Register("pipe.bufferList", (*bufferList)(nil), state.Fns{Save: (*bufferList).save, Load: (*bufferList).load})
	state.Register("pipe.bufferEntry", (*bufferEntry)(nil), state.Fns{Save: (*bufferEntry).save, Load: (*bufferEntry).load})
	state.Register("pipe.inodeOperations", (*inodeOperations)(nil), state.Fns{Save: (*inodeOperations).save, Load: (*inodeOperations).load})
	state.Register("pipe.Pipe", (*Pipe)(nil), state.Fns{Save: (*Pipe).save, Load: (*Pipe).load})
	state.Register("pipe.Reader", (*Reader)(nil), state.Fns{Save: (*Reader).save, Load: (*Reader).load})
	state.Register("pipe.ReaderWriter", (*ReaderWriter)(nil), state.Fns{Save: (*ReaderWriter).save, Load: (*ReaderWriter).load})
	state.Register("pipe.Writer", (*Writer)(nil), state.Fns{Save: (*Writer).save, Load: (*Writer).load})
}