race.go 608 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2012 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build darwin,race linux,race freebsd,race
  5. package unix
  6. import (
  7. "runtime"
  8. "unsafe"
  9. )
  10. const raceenabled = true
  11. func raceAcquire(addr unsafe.Pointer) {
  12. runtime.RaceAcquire(addr)
  13. }
  14. func raceReleaseMerge(addr unsafe.Pointer) {
  15. runtime.RaceReleaseMerge(addr)
  16. }
  17. func raceReadRange(addr unsafe.Pointer, len int) {
  18. runtime.RaceReadRange(addr, len)
  19. }
  20. func raceWriteRange(addr unsafe.Pointer, len int) {
  21. runtime.RaceWriteRange(addr, len)
  22. }