summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/limits/limits_state_autogen.go
blob: b1cdb4c492746d49bf9b398d5b760968880db20e (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
// automatically generated by stateify.

package limits

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

func (x *Limit) beforeSave() {}
func (x *Limit) save(m state.Map) {
	x.beforeSave()
	m.Save("Cur", &x.Cur)
	m.Save("Max", &x.Max)
}

func (x *Limit) afterLoad() {}
func (x *Limit) load(m state.Map) {
	m.Load("Cur", &x.Cur)
	m.Load("Max", &x.Max)
}

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

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

func init() {
	state.Register("limits.Limit", (*Limit)(nil), state.Fns{Save: (*Limit).save, Load: (*Limit).load})
	state.Register("limits.LimitSet", (*LimitSet)(nil), state.Fns{Save: (*LimitSet).save, Load: (*LimitSet).load})
}