1// Copyright 2014 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 5//go:build !race 6 7// Dummy race detection API, used when not built with -race. 8 9package runtime 10 11import ( 12 "unsafe" 13) 14 15const raceenabled = false 16 17// Because raceenabled is false, none of these functions should be called. 18 19func raceReadObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr) { throw("race") } 20func raceWriteObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr) { throw("race") } 21func raceinit() (uintptr, uintptr) { throw("race"); return 0, 0 } 22func racefini() { throw("race") } 23func raceproccreate() uintptr { throw("race"); return 0 } 24func raceprocdestroy(ctx uintptr) { throw("race") } 25func racemapshadow(addr unsafe.Pointer, size uintptr) { throw("race") } 26func racewritepc(addr unsafe.Pointer, callerpc, pc uintptr) { throw("race") } 27func racereadpc(addr unsafe.Pointer, callerpc, pc uintptr) { throw("race") } 28func racereadrangepc(addr unsafe.Pointer, sz, callerpc, pc uintptr) { throw("race") } 29func racewriterangepc(addr unsafe.Pointer, sz, callerpc, pc uintptr) { throw("race") } 30func raceacquire(addr unsafe.Pointer) { throw("race") } 31func raceacquireg(gp *g, addr unsafe.Pointer) { throw("race") } 32func raceacquirectx(racectx uintptr, addr unsafe.Pointer) { throw("race") } 33func racerelease(addr unsafe.Pointer) { throw("race") } 34func racereleaseg(gp *g, addr unsafe.Pointer) { throw("race") } 35func racereleaseacquire(addr unsafe.Pointer) { throw("race") } 36func racereleaseacquireg(gp *g, addr unsafe.Pointer) { throw("race") } 37func racereleasemerge(addr unsafe.Pointer) { throw("race") } 38func racereleasemergeg(gp *g, addr unsafe.Pointer) { throw("race") } 39func racefingo() { throw("race") } 40func racemalloc(p unsafe.Pointer, sz uintptr) { throw("race") } 41func racefree(p unsafe.Pointer, sz uintptr) { throw("race") } 42func racegostart(pc uintptr) uintptr { throw("race"); return 0 } 43func racegoend() { throw("race") } 44func racectxend(racectx uintptr) { throw("race") } 45