Black Lives Matter. Support the Equal Justice Initiative.

Package race

import "internal/race"

Overview ▾

Package race contains helper functions for manually instrumenting code for the race detector.

The runtime package intentionally exports these functions only in the race build; this package exports them unconditionally but without the "race" build tag they are no-ops.


const Enabled = false

func Acquire

func Acquire(addr unsafe.Pointer)

func Disable

func Disable()

func Enable

func Enable()

func Errors

func Errors() int

func Read

func Read(addr unsafe.Pointer)

func ReadRange

func ReadRange(addr unsafe.Pointer, len int)

func Release

func Release(addr unsafe.Pointer)

func ReleaseMerge

func ReleaseMerge(addr unsafe.Pointer)

func Write

func Write(addr unsafe.Pointer)

func WriteRange

func WriteRange(addr unsafe.Pointer, len int)