aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/proc.c
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-02-20 12:15:02 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-02-20 12:15:02 +0400
commit06a488fa97445414b727c5a7f1825e81e6c671ea (patch)
treef3ce87b3cab611ed1ee879b845e5fe6ad9d644d6 /src/pkg/runtime/proc.c
parenta92e11a256d8a527d547a2772992d9d9870fa817 (diff)
downloadgo-06a488fa97445414b727c5a7f1825e81e6c671ea.tar.xz
runtime: fix deadlock detector false negative
Fixes #4819. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7322086
Diffstat (limited to 'src/pkg/runtime/proc.c')
-rw-r--r--src/pkg/runtime/proc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index 5c60cddf9b..111d90b079 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -241,14 +241,13 @@ runtime·main(void)
runtime·sched.init = true;
scvg = runtime·newproc1((byte*)runtime·MHeap_Scavenger, nil, 0, 0, runtime·main);
scvg->issystem = true;
- main·init();
- runtime·sched.init = false;
- runtime·unlockOSThread();
-
// The deadlock detection has false negatives.
// Let scvg start up, to eliminate the false negative
// for the trivial program func main() { select{} }.
runtime·gosched();
+ main·init();
+ runtime·sched.init = false;
+ runtime·unlockOSThread();
main·main();
if(raceenabled)