File: channel_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
  • size: 21,300 kB
  • sloc: asm: 3,361; ansic: 1,197; cpp: 348; makefile: 92; python: 89; sh: 83
file content (79 lines) | stat: -rw-r--r-- 1,824 bytes parent folder | download | duplicates (2)
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
// automatically generated by stateify.

package channel

import (
	"context"

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

func (n *NotificationHandle) StateTypeName() string {
	return "pkg/tcpip/link/channel.NotificationHandle"
}

func (n *NotificationHandle) StateFields() []string {
	return []string{
		"n",
	}
}

func (n *NotificationHandle) beforeSave() {}

// +checklocksignore
func (n *NotificationHandle) StateSave(stateSinkObject state.Sink) {
	n.beforeSave()
	stateSinkObject.Save(0, &n.n)
}

func (n *NotificationHandle) afterLoad(context.Context) {}

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

func (e *Endpoint) StateTypeName() string {
	return "pkg/tcpip/link/channel.Endpoint"
}

func (e *Endpoint) StateFields() []string {
	return []string{
		"LinkEPCapabilities",
		"SupportedGSOKind",
		"dispatcher",
		"linkAddr",
		"mtu",
		"q",
	}
}

func (e *Endpoint) beforeSave() {}

// +checklocksignore
func (e *Endpoint) StateSave(stateSinkObject state.Sink) {
	e.beforeSave()
	stateSinkObject.Save(0, &e.LinkEPCapabilities)
	stateSinkObject.Save(1, &e.SupportedGSOKind)
	stateSinkObject.Save(2, &e.dispatcher)
	stateSinkObject.Save(3, &e.linkAddr)
	stateSinkObject.Save(4, &e.mtu)
	stateSinkObject.Save(5, &e.q)
}

func (e *Endpoint) afterLoad(context.Context) {}

// +checklocksignore
func (e *Endpoint) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &e.LinkEPCapabilities)
	stateSourceObject.Load(1, &e.SupportedGSOKind)
	stateSourceObject.Load(2, &e.dispatcher)
	stateSourceObject.Load(3, &e.linkAddr)
	stateSourceObject.Load(4, &e.mtu)
	stateSourceObject.Load(5, &e.q)
}

func init() {
	state.Register((*NotificationHandle)(nil))
	state.Register((*Endpoint)(nil))
}