diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-07-30 20:47:08 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-07-30 20:47:08 +0000 |
commit | 8110ab1bd357b5cb6cdf4e18e9fabf8cbe4950e5 (patch) | |
tree | 52c621494f5f8184b356c33cfdeeb8e7ae7c7a45 /pkg/sync | |
parent | 904163540563b2d9c1069ae348a1a4e05efc675c (diff) | |
parent | 62ea5c0a2212b9827f093551fc3da166facb9f0b (diff) |
Merge release-20210726.0-12-g62ea5c0a2 (automated)
Diffstat (limited to 'pkg/sync')
-rw-r--r-- | pkg/sync/goyield_unsafe.go | 8 | ||||
-rw-r--r-- | pkg/sync/runtime_unsafe.go | 13 |
2 files changed, 14 insertions, 7 deletions
diff --git a/pkg/sync/goyield_unsafe.go b/pkg/sync/goyield_unsafe.go index 8639bb64e..757edbaba 100644 --- a/pkg/sync/goyield_unsafe.go +++ b/pkg/sync/goyield_unsafe.go @@ -3,10 +3,12 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.14 && !go1.18 -// +build go1.14,!go1.18 +//go:build go1.14 +// +build go1.14 -// Check go:linkname function signatures when updating Go version. +// //go:linkname directives type-checked by checklinkname. Any other +// non-linkname assumptions outside the Go 1 compatibility guarantee should +// have an accompanied vet check or version guard build tag. package sync diff --git a/pkg/sync/runtime_unsafe.go b/pkg/sync/runtime_unsafe.go index 1d9cf304e..49d4109a9 100644 --- a/pkg/sync/runtime_unsafe.go +++ b/pkg/sync/runtime_unsafe.go @@ -6,8 +6,13 @@ //go:build go1.13 && !go1.18 // +build go1.13,!go1.18 -// Check go:linkname function signatures, type definitions, and constants when -// updating Go version. +// //go:linkname directives type-checked by checklinkname. Any other +// non-linkname assumptions outside the Go 1 compatibility guarantee should +// have an accompanied vet check or version guard build tag. + +// Check type definitions and constants when updating Go version. +// +// TODO(b/165820485): add these checks to checklinkname. package sync @@ -109,10 +114,10 @@ type maptype struct { // These functions are only used within the sync package. //go:linkname semacquire sync.runtime_Semacquire -func semacquire(s *uint32) +func semacquire(addr *uint32) //go:linkname semrelease sync.runtime_Semrelease -func semrelease(s *uint32, handoff bool, skipframes int) +func semrelease(addr *uint32, handoff bool, skipframes int) //go:linkname canSpin sync.runtime_canSpin func canSpin(i int) bool |