[1/7] Preprocessor cleanup
[official-gcc.git] / libgo / go / runtime / race0.go
blobf1d3706231779887e50d83400fed2ce2c47872cb
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.
5 // +build !race
7 // Dummy race detection API, used when not built with -race.
9 package runtime
11 import (
12 "unsafe"
15 const raceenabled = false
17 // Because raceenabled is false, none of these functions should be called.
19 func raceReadObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr) { throw("race") }
20 func raceWriteObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr) { throw("race") }
21 func raceinit() (uintptr, uintptr) { throw("race"); return 0, 0 }
22 func racefini() { throw("race") }
23 func raceproccreate() uintptr { throw("race"); return 0 }
24 func raceprocdestroy(ctx uintptr) { throw("race") }
25 func racemapshadow(addr unsafe.Pointer, size uintptr) { throw("race") }
26 func racewritepc(addr unsafe.Pointer, callerpc, pc uintptr) { throw("race") }
27 func racereadpc(addr unsafe.Pointer, callerpc, pc uintptr) { throw("race") }
28 func racereadrangepc(addr unsafe.Pointer, sz, callerpc, pc uintptr) { throw("race") }
29 func racewriterangepc(addr unsafe.Pointer, sz, callerpc, pc uintptr) { throw("race") }
30 func raceacquire(addr unsafe.Pointer) { throw("race") }
31 func raceacquireg(gp *g, addr unsafe.Pointer) { throw("race") }
32 func racerelease(addr unsafe.Pointer) { throw("race") }
33 func racereleaseg(gp *g, addr unsafe.Pointer) { throw("race") }
34 func racereleasemerge(addr unsafe.Pointer) { throw("race") }
35 func racereleasemergeg(gp *g, addr unsafe.Pointer) { throw("race") }
36 func racefingo() { throw("race") }
37 func racemalloc(p unsafe.Pointer, sz uintptr) { throw("race") }
38 func racefree(p unsafe.Pointer, sz uintptr) { throw("race") }
39 func racegostart(pc uintptr) uintptr { throw("race"); return 0 }
40 func racegoend() { throw("race") }