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/spin_legacy_unsafe.go | |
parent | bdaae08ee2b4834422d46cdfd292161e974e4d26 (diff) |
Consolidate most synchronization primitive linknames in the sync package.
PiperOrigin-RevId: 345359823
Diffstat (limited to 'pkg/sync/spin_legacy_unsafe.go')
-rw-r--r-- | pkg/sync/spin_legacy_unsafe.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/pkg/sync/spin_legacy_unsafe.go b/pkg/sync/spin_legacy_unsafe.go deleted file mode 100644 index 61fc7320e..000000000 --- a/pkg/sync/spin_legacy_unsafe.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2020 The gVisor Authors. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.13 -// +build !go1.14 - -package sync - -import ( - "runtime" - _ "unsafe" // for go:linkname -) - -//go:linkname canSpin sync.runtime_canSpin -func canSpin(i int) bool - -//go:linkname doSpin sync.runtime_doSpin -func doSpin() - -func goyield() { - // goyield is not available until Go 1.14. - runtime.Gosched() -} |