summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/time/time_state_autogen.go
blob: ab6c6633d5684aeecfbe193565b8374730f46873 (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
// automatically generated by stateify.

package time

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

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

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

func (x *Setting) beforeSave() {}
func (x *Setting) save(m state.Map) {
	x.beforeSave()
	m.Save("Enabled", &x.Enabled)
	m.Save("Next", &x.Next)
	m.Save("Period", &x.Period)
}

func (x *Setting) afterLoad() {}
func (x *Setting) load(m state.Map) {
	m.Load("Enabled", &x.Enabled)
	m.Load("Next", &x.Next)
	m.Load("Period", &x.Period)
}

func (x *Timer) beforeSave() {}
func (x *Timer) save(m state.Map) {
	x.beforeSave()
	m.Save("clock", &x.clock)
	m.Save("listener", &x.listener)
	m.Save("setting", &x.setting)
	m.Save("paused", &x.paused)
}

func (x *Timer) afterLoad() {}
func (x *Timer) load(m state.Map) {
	m.Load("clock", &x.clock)
	m.Load("listener", &x.listener)
	m.Load("setting", &x.setting)
	m.Load("paused", &x.paused)
}

func init() {
	state.Register("pkg/sentry/kernel/time.Time", (*Time)(nil), state.Fns{Save: (*Time).save, Load: (*Time).load})
	state.Register("pkg/sentry/kernel/time.Setting", (*Setting)(nil), state.Fns{Save: (*Setting).save, Load: (*Setting).load})
	state.Register("pkg/sentry/kernel/time.Timer", (*Timer)(nil), state.Fns{Save: (*Timer).save, Load: (*Timer).load})
}