diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-12-03 03:11:52 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-03 03:11:52 +0000 |
commit | 2a5a8895afaa67d29d305316f7abcd3b066bde13 (patch) | |
tree | 9bda941ac38f1f457ccab5afa42f6856df74197a /pkg/sync/race_unsafe.go | |
parent | bb07db347172825b2b5411e4e7a23f036d8871f2 (diff) | |
parent | ed8bdf461b5f8093957a11f526032d42938af7ca (diff) |
Merge release-20201130.0-25-ged8bdf461 (automated)
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 |