File: timerfd_state_autogen.go

package info (click to toggle)
golang-gvisor-gvisor 0.0~20221219.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-proposed-updates
  • size: 17,136 kB
  • sloc: asm: 2,860; cpp: 348; python: 89; sh: 40; makefile: 34; ansic: 21
file content (54 lines) | stat: -rw-r--r-- 1,440 bytes parent folder | download
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
// automatically generated by stateify.

package timerfd

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

func (tfd *TimerFileDescription) StateTypeName() string {
	return "pkg/sentry/fsimpl/timerfd.TimerFileDescription"
}

func (tfd *TimerFileDescription) StateFields() []string {
	return []string{
		"vfsfd",
		"FileDescriptionDefaultImpl",
		"DentryMetadataFileDescriptionImpl",
		"NoLockFD",
		"events",
		"timer",
		"val",
	}
}

func (tfd *TimerFileDescription) beforeSave() {}

// +checklocksignore
func (tfd *TimerFileDescription) StateSave(stateSinkObject state.Sink) {
	tfd.beforeSave()
	stateSinkObject.Save(0, &tfd.vfsfd)
	stateSinkObject.Save(1, &tfd.FileDescriptionDefaultImpl)
	stateSinkObject.Save(2, &tfd.DentryMetadataFileDescriptionImpl)
	stateSinkObject.Save(3, &tfd.NoLockFD)
	stateSinkObject.Save(4, &tfd.events)
	stateSinkObject.Save(5, &tfd.timer)
	stateSinkObject.Save(6, &tfd.val)
}

func (tfd *TimerFileDescription) afterLoad() {}

// +checklocksignore
func (tfd *TimerFileDescription) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &tfd.vfsfd)
	stateSourceObject.Load(1, &tfd.FileDescriptionDefaultImpl)
	stateSourceObject.Load(2, &tfd.DentryMetadataFileDescriptionImpl)
	stateSourceObject.Load(3, &tfd.NoLockFD)
	stateSourceObject.Load(4, &tfd.events)
	stateSourceObject.Load(5, &tfd.timer)
	stateSourceObject.Load(6, &tfd.val)
}

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