summaryrefslogtreecommitdiffhomepage
path: root/pkg/sync/generic_seqatomic_unsafe.go
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2021-04-14 11:27:05 -0700
committergVisor bot <gvisor-bot@google.com>2021-04-14 11:28:49 -0700
commit5c1052b6bb2658208f1afaf423aeac98f30235c1 (patch)
tree7ff6b62adec989fd1ff2bd67a883fa8399174ae8 /pkg/sync/generic_seqatomic_unsafe.go
parent36dbd3b97dbc455c6d710f4530ec8a07474dee64 (diff)
[syserror] Remove syserror from go_marshal
PiperOrigin-RevId: 368470656
Diffstat (limited to 'pkg/sync/generic_seqatomic_unsafe.go')
-rw-r--r--pkg/sync/generic_seqatomic_unsafe.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sync/generic_seqatomic_unsafe.go b/pkg/sync/generic_seqatomic_unsafe.go
index 82b676abf..9578c9c52 100644
--- a/pkg/sync/generic_seqatomic_unsafe.go
+++ b/pkg/sync/generic_seqatomic_unsafe.go
@@ -10,6 +10,7 @@ package seqatomic
import (
"unsafe"
+ "gvisor.dev/gvisor/pkg/gohacks"
"gvisor.dev/gvisor/pkg/sync"
)
@@ -39,7 +40,7 @@ func SeqAtomicTryLoad(seq *sync.SeqCount, epoch sync.SeqCountEpoch, ptr *Value)
// runtime.RaceDisable() doesn't actually stop the race detector, so it
// can't help us here. Instead, call runtime.memmove directly, which is
// not instrumented by the race detector.
- sync.Memmove(unsafe.Pointer(&val), unsafe.Pointer(ptr), unsafe.Sizeof(val))
+ gohacks.Memmove(unsafe.Pointer(&val), unsafe.Pointer(ptr), unsafe.Sizeof(val))
} else {
// This is ~40% faster for short reads than going through memmove.
val = *ptr