summaryrefslogtreecommitdiff
path: root/src/syscall/race.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/race.go')
-rw-r--r--src/syscall/race.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/syscall/race.go b/src/syscall/race.go
new file mode 100644
index 000000000..e69c1119a
--- /dev/null
+++ b/src/syscall/race.go
@@ -0,0 +1,30 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build race
+
+package syscall
+
+import (
+ "runtime"
+ "unsafe"
+)
+
+const raceenabled = true
+
+func raceAcquire(addr unsafe.Pointer) {
+ runtime.RaceAcquire(addr)
+}
+
+func raceReleaseMerge(addr unsafe.Pointer) {
+ runtime.RaceReleaseMerge(addr)
+}
+
+func raceReadRange(addr unsafe.Pointer, len int) {
+ runtime.RaceReadRange(addr, len)
+}
+
+func raceWriteRange(addr unsafe.Pointer, len int) {
+ runtime.RaceWriteRange(addr, len)
+}