summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2021-04-05 11:54:50 -0700
committerKevin Krakauer <krakauer@google.com>2021-05-06 13:04:59 -0700
commiteded0d28de7f62423e496d89fd2699bb02e2744f (patch)
tree13a6b4648fc3973adf4b4bba0bd7e8218fa805ae /pkg
parenta6c623ed9f971d6fbebddaf9ad03d357994647cc (diff)
mark types as saveable
Diffstat (limited to 'pkg')
-rw-r--r--pkg/atomicbitops/aligned_32bit_unsafe.go4
-rw-r--r--pkg/atomicbitops/aligned_64bit.go4
2 files changed, 8 insertions, 0 deletions
diff --git a/pkg/atomicbitops/aligned_32bit_unsafe.go b/pkg/atomicbitops/aligned_32bit_unsafe.go
index 200fc0092..3ebbee7b1 100644
--- a/pkg/atomicbitops/aligned_32bit_unsafe.go
+++ b/pkg/atomicbitops/aligned_32bit_unsafe.go
@@ -30,6 +30,8 @@ import (
// for 64-bit alignment of 64-bit words accessed atomically. The first word in
// a variable or in an allocated struct, array, or slice can be relied upon to
// be 64-bit aligned."
+//
+// +stateify savable
type AlignedAtomicInt64 struct {
value [15]byte
}
@@ -65,6 +67,8 @@ func (aa *AlignedAtomicInt64) Add(v int64) int64 {
// for 64-bit alignment of 64-bit words accessed atomically. The first word in
// a variable or in an allocated struct, array, or slice can be relied upon to
// be 64-bit aligned."
+//
+// +stateify savable
type AlignedAtomicUint64 struct {
value [15]byte
}
diff --git a/pkg/atomicbitops/aligned_64bit.go b/pkg/atomicbitops/aligned_64bit.go
index 5898653d8..0f3da590f 100644
--- a/pkg/atomicbitops/aligned_64bit.go
+++ b/pkg/atomicbitops/aligned_64bit.go
@@ -23,6 +23,8 @@ import "sync/atomic"
// int64.
//
// See aligned_unsafe.go in this directory for justification.
+//
+// +stateify savable
type AlignedAtomicInt64 struct {
value int64
}
@@ -47,6 +49,8 @@ func (aa *AlignedAtomicInt64) Add(v int64) int64 {
// uint64.
//
// See aligned_unsafe.go in this directory for justification.
+//
+// +stateify savable
type AlignedAtomicUint64 struct {
value uint64
}