summaryrefslogtreecommitdiffhomepage
path: root/pkg/syncutil/downgradable_rwmutex_1_12_unsafe.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/syncutil/downgradable_rwmutex_1_12_unsafe.go')
-rwxr-xr-xpkg/syncutil/downgradable_rwmutex_1_12_unsafe.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkg/syncutil/downgradable_rwmutex_1_12_unsafe.go b/pkg/syncutil/downgradable_rwmutex_1_12_unsafe.go
new file mode 100755
index 000000000..7c6336e62
--- /dev/null
+++ b/pkg/syncutil/downgradable_rwmutex_1_12_unsafe.go
@@ -0,0 +1,21 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2019 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.12
+// +build !go1.13
+
+// TODO(b/133868570): Delete once Go 1.12 is no longer supported.
+
+package syncutil
+
+import _ "unsafe"
+
+//go:linkname runtimeSemrelease112 sync.runtime_Semrelease
+func runtimeSemrelease112(s *uint32, handoff bool)
+
+func runtimeSemrelease(s *uint32, handoff bool, skipframes int) {
+ // 'skipframes' is only available starting from 1.13.
+ runtimeSemrelease112(s, handoff)
+}