github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/src/pkg/runtime/race0.c (about) 1 // Copyright 2011 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 // Stub implementation of the race detector API. 6 // +build !race 7 8 #include "runtime.h" 9 10 uintptr 11 runtime·raceinit(void) 12 { 13 return 0; 14 } 15 16 void 17 runtime·racefini(void) 18 { 19 } 20 21 22 void 23 runtime·racemapshadow(void *addr, uintptr size) 24 { 25 USED(addr); 26 USED(size); 27 } 28 29 void 30 runtime·racewritepc(void *addr, void *callpc, void *pc) 31 { 32 USED(addr); 33 USED(callpc); 34 USED(pc); 35 } 36 37 void 38 runtime·racereadpc(void *addr, void *callpc, void *pc) 39 { 40 USED(addr); 41 USED(callpc); 42 USED(pc); 43 } 44 45 void 46 runtime·racewriterangepc(void *addr, uintptr sz, uintptr step, void *callpc, void *pc) 47 { 48 USED(addr); 49 USED(sz); 50 USED(step); 51 USED(callpc); 52 USED(pc); 53 } 54 55 void 56 runtime·racereadrangepc(void *addr, uintptr sz, uintptr step, void *callpc, void *pc) 57 { 58 USED(addr); 59 USED(sz); 60 USED(step); 61 USED(callpc); 62 USED(pc); 63 } 64 65 void 66 runtime·raceacquire(void *addr) 67 { 68 USED(addr); 69 } 70 71 void 72 runtime·raceacquireg(G *gp, void *addr) 73 { 74 USED(gp); 75 USED(addr); 76 } 77 78 void 79 runtime·racerelease(void *addr) 80 { 81 USED(addr); 82 } 83 84 void 85 runtime·racereleaseg(G *gp, void *addr) 86 { 87 USED(gp); 88 USED(addr); 89 } 90 91 void 92 runtime·racereleasemerge(void *addr) 93 { 94 USED(addr); 95 } 96 97 void 98 runtime·racereleasemergeg(G *gp, void *addr) 99 { 100 USED(gp); 101 USED(addr); 102 } 103 104 void 105 runtime·racefingo(void) 106 { 107 } 108 109 void 110 runtime·racemalloc(void *p, uintptr sz, void *pc) 111 { 112 USED(p); 113 USED(sz); 114 USED(pc); 115 } 116 117 void 118 runtime·racefree(void *p) 119 { 120 USED(p); 121 } 122 123 uintptr 124 runtime·racegostart(void *pc) 125 { 126 USED(pc); 127 return 0; 128 } 129 130 void 131 runtime·racegoend(void) 132 { 133 }