]> Cypherpunks repositories - gostls13.git/commit
runtime: work around false negative in deadlock detection
authorRuss Cox <rsc@golang.org>
Tue, 27 Mar 2012 16:22:19 +0000 (12:22 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 27 Mar 2012 16:22:19 +0000 (12:22 -0400)
commit5eb007dedeb59a52a3000202dcb162a3677a384b
tree12a2cef73e5e622222822d2a25c08c662e4fb084
parent9d7076b178e3b688a8421a8ce02466a3701d31a0
runtime: work around false negative in deadlock detection

Not a complete fix for issue 3342, but fixes the trivial case.
There may still be a race in the instants before and after
a scavenger-induced garbage collection.

Intended to be "obviously safe": a call to runtime·gosched
before main.main is no different than a call to runtime.Gosched
at the beginning of main.main, and it is (or had better be)
safe to call runtime.Gosched at any point during main.

Update #3342.

R=iant
CC=golang-dev
https://golang.org/cl/5919052
src/pkg/runtime/proc.c
test/fixedbugs/bug429.go [new file with mode: 0644]
test/golden.out