1
0
mirror of https://github.com/golang/go synced 2024-11-19 17:14:44 -07:00
go/src/pkg/runtime/race.h
Dmitriy Vyukov 0a40cd2661 runtime/race: switch to explicit race context instead of goroutine id's
Removes limit on maximum number of goroutines ever existed.
code.google.com/p/goexecutor tests now pass successfully.
Also slightly improves performance.
Before: $ time ./flate.test -test.short
real	0m9.314s
After:  $ time ./flate.test -test.short
real	0m8.958s
Fixes #4286.
The runtime is built from llvm rev 174312.

R=rsc
CC=golang-dev
https://golang.org/cl/7218044
2013-02-06 11:40:54 +04:00

34 lines
1.2 KiB
C

// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Definitions related to data race detection.
#ifdef RACE
enum { raceenabled = 1 };
#else
enum { raceenabled = 0 };
#endif
// Initialize race detection subsystem.
uintptr runtime·raceinit(void);
// Finalize race detection subsystem, does not return.
void runtime·racefini(void);
void runtime·racemapshadow(void *addr, uintptr size);
void runtime·racemalloc(void *p, uintptr sz, void *pc);
void runtime·racefree(void *p);
uintptr runtime·racegostart(void *pc);
void runtime·racegoend(void);
void runtime·racewritepc(void *addr, void *callpc, void *pc);
void runtime·racereadpc(void *addr, void *callpc, void *pc);
void runtime·racewriterangepc(void *addr, uintptr sz, uintptr step, void *callpc, void *pc);
void runtime·racereadrangepc(void *addr, uintptr sz, uintptr step, void *callpc, void *pc);
void runtime·racefingo(void);
void runtime·raceacquire(void *addr);
void runtime·raceacquireg(G *gp, void *addr);
void runtime·racerelease(void *addr);
void runtime·racereleaseg(G *gp, void *addr);
void runtime·racereleasemerge(void *addr);
void runtime·racereleasemergeg(G *gp, void *addr);