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 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
// automatically generated by stateify.
//go:build !arm && !mips && !mipsle && !386 && !arm && !mips && !mipsle && !386
// +build !arm,!mips,!mipsle,!386,!arm,!mips,!mipsle,!386
package atomicbitops
import (
"context"
"gvisor.dev/gvisor/pkg/state"
)
func (i *Int32) StateTypeName() string {
return "pkg/atomicbitops.Int32"
}
func (i *Int32) StateFields() []string {
return []string{
"value",
}
}
func (i *Int32) beforeSave() {}
// +checklocksignore
func (i *Int32) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
stateSinkObject.Save(0, &i.value)
}
func (i *Int32) afterLoad(context.Context) {}
// +checklocksignore
func (i *Int32) StateLoad(ctx context.Context, stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.value)
}
func (u *Uint32) StateTypeName() string {
return "pkg/atomicbitops.Uint32"
}
func (u *Uint32) StateFields() []string {
return []string{
"value",
}
}
func (u *Uint32) beforeSave() {}
// +checklocksignore
func (u *Uint32) StateSave(stateSinkObject state.Sink) {
u.beforeSave()
stateSinkObject.Save(0, &u.value)
}
func (u *Uint32) afterLoad(context.Context) {}
// +checklocksignore
func (u *Uint32) StateLoad(ctx context.Context, stateSourceObject state.Source) {
stateSourceObject.Load(0, &u.value)
}
func (b *Bool) StateTypeName() string {
return "pkg/atomicbitops.Bool"
}
func (b *Bool) StateFields() []string {
return []string{
"Uint32",
}
}
func (b *Bool) beforeSave() {}
// +checklocksignore
func (b *Bool) StateSave(stateSinkObject state.Sink) {
b.beforeSave()
stateSinkObject.Save(0, &b.Uint32)
}
func (b *Bool) afterLoad(context.Context) {}
// +checklocksignore
func (b *Bool) StateLoad(ctx context.Context, stateSourceObject state.Source) {
stateSourceObject.Load(0, &b.Uint32)
}
func (i *Int64) StateTypeName() string {
return "pkg/atomicbitops.Int64"
}
func (i *Int64) StateFields() []string {
return []string{
"value",
}
}
func (i *Int64) beforeSave() {}
// +checklocksignore
func (i *Int64) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
stateSinkObject.Save(0, &i.value)
}
func (i *Int64) afterLoad(context.Context) {}
// +checklocksignore
func (i *Int64) StateLoad(ctx context.Context, stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.value)
}
func (u *Uint64) StateTypeName() string {
return "pkg/atomicbitops.Uint64"
}
func (u *Uint64) StateFields() []string {
return []string{
"value",
}
}
func (u *Uint64) beforeSave() {}
// +checklocksignore
func (u *Uint64) StateSave(stateSinkObject state.Sink) {
u.beforeSave()
stateSinkObject.Save(0, &u.value)
}
func (u *Uint64) afterLoad(context.Context) {}
// +checklocksignore
func (u *Uint64) StateLoad(ctx context.Context, stateSourceObject state.Source) {
stateSourceObject.Load(0, &u.value)
}
func init() {
state.Register((*Int32)(nil))
state.Register((*Uint32)(nil))
state.Register((*Bool)(nil))
state.Register((*Int64)(nil))
state.Register((*Uint64)(nil))
}
|