Commit 7c44edf4 authored by Shenghou Ma's avatar Shenghou Ma

runtime, runtime/race: add missing if(raceenabled), update package docs of pkg race

R=dvyukov
CC=golang-dev
https://golang.org/cl/6733058
parent 7c03cd32
...@@ -715,7 +715,8 @@ runtime·cnew(Type *typ) ...@@ -715,7 +715,8 @@ runtime·cnew(Type *typ)
uint32 flag; uint32 flag;
void *ret; void *ret;
m->racepc = runtime·getcallerpc(&typ); if(raceenabled)
m->racepc = runtime·getcallerpc(&typ);
flag = typ->kind&KindNoPointers ? FlagNoPointers : 0; flag = typ->kind&KindNoPointers ? FlagNoPointers : 0;
ret = runtime·mallocgc(typ->size, flag, 1, 1); ret = runtime·mallocgc(typ->size, flag, 1, 1);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// +build race,linux,amd64 race,darwin,amd64 // +build race,linux,amd64 race,darwin,amd64
// Data race detection. // Package race provides low-level facilities for data race detection.
package race package race
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment