summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go
blob: 19e23104fd812a75290963bfc31c268657cc0030 (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
// automatically generated by stateify.

package futex

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

func (p *AtomicPtrBucket) StateTypeName() string {
	return "pkg/sentry/kernel/futex.AtomicPtrBucket"
}

func (p *AtomicPtrBucket) StateFields() []string {
	return []string{
		"ptr",
	}
}

func (p *AtomicPtrBucket) beforeSave() {}

func (p *AtomicPtrBucket) StateSave(stateSinkObject state.Sink) {
	p.beforeSave()
	var ptrValue *bucket = p.savePtr()
	stateSinkObject.SaveValue(0, ptrValue)
}

func (p *AtomicPtrBucket) afterLoad() {}

func (p *AtomicPtrBucket) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.LoadValue(0, new(*bucket), func(y interface{}) { p.loadPtr(y.(*bucket)) })
}

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