aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.h
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2011-08-04 08:31:03 -0400
committerRuss Cox <rsc@golang.org>2011-08-04 08:31:03 -0400
commitd770aadee5063ecc54ca8f57fc4906972a2de033 (patch)
treef38c9cb08fcb79c4bd098e03a445f646eeb35ab8 /src/pkg/runtime/runtime.h
parent62d4b8ebd2c00e3c3d54d05dc7fe56d829b5aa01 (diff)
downloadgo-d770aadee5063ecc54ca8f57fc4906972a2de033.tar.xz
runtime: faster chan creation on Linux/FreeBSD/Plan9
The change removes chan finalizer (Lock destructor) if it is not required on the platform. benchmark old ns/op new ns/op delta BenchmarkChanCreation 1132.00 381.00 -66.34% BenchmarkChanCreation-2 1215.00 243.00 -80.00% BenchmarkChanCreation-4 1084.00 186.00 -82.84% BenchmarkChanCreation-8 1415.00 154.00 -89.12% BenchmarkChanCreation-16 1386.00 144.00 -89.61% (on 2 x Intel Xeon E5620, 8 HT cores, 2.4 GHz, Linux) R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4841041
Diffstat (limited to 'src/pkg/runtime/runtime.h')
-rw-r--r--src/pkg/runtime/runtime.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index 434c82b95d..d2e4378b59 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -380,6 +380,7 @@ extern uint32 runtime·panicking;
extern int32 runtime·gcwaiting; // gc is waiting to run
int8* runtime·goos;
extern bool runtime·iscgo;
+extern void (*runtime·destroylock)(Lock*);
/*
* common functions and data
@@ -515,7 +516,6 @@ void runtime·starttheworld(void);
*/
void runtime·lock(Lock*);
void runtime·unlock(Lock*);
-void runtime·destroylock(Lock*);
/*
* sleep and wakeup on one-time events.