]> Cypherpunks repositories - gostls13.git/commit
runtime: clear locked bit when goroutine exits
authorRuss Cox <rsc@golang.org>
Fri, 8 Mar 2013 16:26:00 +0000 (11:26 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 8 Mar 2013 16:26:00 +0000 (11:26 -0500)
commit1a4599b41ac2220c58959f434518eddb1a84060c
treedd8a4cb331cf9592269217432081d613c9855586
parent091d7210c7bbcc7497a48a41be091e1957d17717
runtime: clear locked bit when goroutine exits

Otherwise the next goroutine run on the m
can get inadvertently locked if it executes a cgo call
that turns on the internal lock.

While we're here, fix the cgo panic unwind to
decrement m->ncgo like the non-panic unwind does.

Fixes #4971.

R=golang-dev, iant, dvyukov
CC=golang-dev
https://golang.org/cl/7627043
src/pkg/runtime/cgocall.c
src/pkg/runtime/proc.c
src/pkg/runtime/syscall_windows_test.go