File: iouringfs_state_autogen.go

package info (click to toggle)
golang-gvisor-gvisor 0.0~20240729.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-proposed-updates
  • size: 21,300 kB
  • sloc: asm: 3,361; ansic: 1,197; cpp: 348; makefile: 92; python: 89; sh: 83
file content (111 lines) | stat: -rw-r--r-- 2,855 bytes parent folder | download | duplicates (3)
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
// automatically generated by stateify.

package iouringfs

import (
	"context"

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

func (fd *FileDescription) StateTypeName() string {
	return "pkg/sentry/fsimpl/iouringfs.FileDescription"
}

func (fd *FileDescription) StateFields() []string {
	return []string{
		"vfsfd",
		"FileDescriptionDefaultImpl",
		"DentryMetadataFileDescriptionImpl",
		"NoLockFD",
		"rbmf",
		"sqemf",
		"running",
		"ioRings",
		"remap",
	}
}

// +checklocksignore
func (fd *FileDescription) StateSave(stateSinkObject state.Sink) {
	fd.beforeSave()
	stateSinkObject.Save(0, &fd.vfsfd)
	stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl)
	stateSinkObject.Save(2, &fd.DentryMetadataFileDescriptionImpl)
	stateSinkObject.Save(3, &fd.NoLockFD)
	stateSinkObject.Save(4, &fd.rbmf)
	stateSinkObject.Save(5, &fd.sqemf)
	stateSinkObject.Save(6, &fd.running)
	stateSinkObject.Save(7, &fd.ioRings)
	stateSinkObject.Save(8, &fd.remap)
}

// +checklocksignore
func (fd *FileDescription) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &fd.vfsfd)
	stateSourceObject.Load(1, &fd.FileDescriptionDefaultImpl)
	stateSourceObject.Load(2, &fd.DentryMetadataFileDescriptionImpl)
	stateSourceObject.Load(3, &fd.NoLockFD)
	stateSourceObject.Load(4, &fd.rbmf)
	stateSourceObject.Load(5, &fd.sqemf)
	stateSourceObject.Load(6, &fd.running)
	stateSourceObject.Load(7, &fd.ioRings)
	stateSourceObject.Load(8, &fd.remap)
	stateSourceObject.AfterLoad(func() { fd.afterLoad(ctx) })
}

func (sqemf *sqEntriesFile) StateTypeName() string {
	return "pkg/sentry/fsimpl/iouringfs.sqEntriesFile"
}

func (sqemf *sqEntriesFile) StateFields() []string {
	return []string{
		"fr",
	}
}

func (sqemf *sqEntriesFile) beforeSave() {}

// +checklocksignore
func (sqemf *sqEntriesFile) StateSave(stateSinkObject state.Sink) {
	sqemf.beforeSave()
	stateSinkObject.Save(0, &sqemf.fr)
}

func (sqemf *sqEntriesFile) afterLoad(context.Context) {}

// +checklocksignore
func (sqemf *sqEntriesFile) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &sqemf.fr)
}

func (rbmf *ringsBufferFile) StateTypeName() string {
	return "pkg/sentry/fsimpl/iouringfs.ringsBufferFile"
}

func (rbmf *ringsBufferFile) StateFields() []string {
	return []string{
		"fr",
	}
}

func (rbmf *ringsBufferFile) beforeSave() {}

// +checklocksignore
func (rbmf *ringsBufferFile) StateSave(stateSinkObject state.Sink) {
	rbmf.beforeSave()
	stateSinkObject.Save(0, &rbmf.fr)
}

func (rbmf *ringsBufferFile) afterLoad(context.Context) {}

// +checklocksignore
func (rbmf *ringsBufferFile) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &rbmf.fr)
}

func init() {
	state.Register((*FileDescription)(nil))
	state.Register((*sqEntriesFile)(nil))
	state.Register((*ringsBufferFile)(nil))
}