diff options
author | Jamie Liu <jamieliu@google.com> | 2020-12-02 19:06:41 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-02 19:08:32 -0800 |
commit | ed8bdf461b5f8093957a11f526032d42938af7ca (patch) | |
tree | abb6be971535360397634f568d26c60a4696c0c1 /pkg/sync/race_unsafe.go | |
parent | bdaae08ee2b4834422d46cdfd292161e974e4d26 (diff) |
Consolidate most synchronization primitive linknames in the sync package.
PiperOrigin-RevId: 345359823
Diffstat (limited to 'pkg/sync/race_unsafe.go')
-rw-r--r-- | pkg/sync/race_unsafe.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/sync/race_unsafe.go b/pkg/sync/race_unsafe.go index 31d8fa9a6..59985c270 100644 --- a/pkg/sync/race_unsafe.go +++ b/pkg/sync/race_unsafe.go @@ -39,3 +39,9 @@ func RaceRelease(addr unsafe.Pointer) { func RaceReleaseMerge(addr unsafe.Pointer) { runtime.RaceReleaseMerge(addr) } + +// RaceUncheckedAtomicCompareAndSwapUintptr is equivalent to +// sync/atomic.CompareAndSwapUintptr, but is not checked by the race detector. +// This is necessary when implementing gopark callbacks, since no race context +// is available during their execution. +func RaceUncheckedAtomicCompareAndSwapUintptr(ptr *uintptr, old, new uintptr) bool |