forked from ebhomengo/niki
1
0
Fork 0
niki/vendor/golang.org/x/sys/unix/race.go

41 lines
639 B
Go
Raw Normal View History

2024-02-18 10:42:21 +00:00
// Copyright 2012 The Go Authors. All rights reserved.
2024-02-18 10:42:21 +00:00
// Use of this source code is governed by a BSD-style
2024-02-18 10:42:21 +00:00
// license that can be found in the LICENSE file.
//go:build (darwin && race) || (linux && race) || (freebsd && race)
package unix
import (
"runtime"
"unsafe"
)
const raceenabled = true
func raceAcquire(addr unsafe.Pointer) {
2024-02-18 10:42:21 +00:00
runtime.RaceAcquire(addr)
2024-02-18 10:42:21 +00:00
}
func raceReleaseMerge(addr unsafe.Pointer) {
2024-02-18 10:42:21 +00:00
runtime.RaceReleaseMerge(addr)
2024-02-18 10:42:21 +00:00
}
func raceReadRange(addr unsafe.Pointer, len int) {
2024-02-18 10:42:21 +00:00
runtime.RaceReadRange(addr, len)
2024-02-18 10:42:21 +00:00
}
func raceWriteRange(addr unsafe.Pointer, len int) {
2024-02-18 10:42:21 +00:00
runtime.RaceWriteRange(addr, len)
2024-02-18 10:42:21 +00:00
}