void runtime·raceinit(void) { uintptr sz; m->racecall = true; runtime∕race·Initialize(); sz = (byte*)&runtime·mheap - noptrdata; if(sz) runtime∕race·MapShadow(noptrdata, sz); sz = enoptrbss - (byte*)(&runtime·mheap+1); if(sz) runtime∕race·MapShadow(&runtime·mheap+1, sz); m->racecall = false; }
void runtime·racemapshadow(void *addr, uintptr size) { m->racecall = true; runtime∕race·MapShadow(addr, size); m->racecall = false; }
uintptr runtime·raceinit(void) { uintptr racectx; m->racecall = true; runtime∕race·Initialize(&racectx); runtime∕race·MapShadow(noptrdata, enoptrbss - noptrdata); m->racecall = false; return racectx; }
uintptr runtime·raceinit(void) { uintptr racectx, start, size; m->racecall = true; runtime∕race·Initialize(&racectx); // Round data segment to page boundaries, because it's used in mmap(). start = (uintptr)noptrdata & ~(PageSize-1); size = ROUND((uintptr)enoptrbss - start, PageSize); runtime∕race·MapShadow((void*)start, size); m->racecall = false; return racectx; }