]> Cypherpunks repositories - gostls13.git/commit
runtime: minimize time between lockextra/unlockextra
authorIan Lance Taylor <iant@golang.org>
Tue, 12 Jan 2016 23:34:03 +0000 (15:34 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 14 Jan 2016 05:55:43 +0000 (05:55 +0000)
commitefd93a412eb5941d767b70097e93a589747de34f
tree2f11a4fc4129ea55c51931d10b9ba2ebf6c817c3
parentf36ee8c2494465a78f416e7f7653134b5428c168
runtime: minimize time between lockextra/unlockextra

This doesn't fix a bug, but may improve performance in programs that
have many concurrent calls from C to Go.  The old code made several
system calls between lockextra and unlockextra.  That could be happening
while another thread is spinning acquiring lockextra.  This changes the
code to not make any system calls while holding the lock.

Change-Id: I50576478e478670c3d6429ad4e1b7d80f98a19d8
Reviewed-on: https://go-review.googlesource.com/18548
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/os1_darwin.go
src/runtime/os1_dragonfly.go
src/runtime/os1_freebsd.go
src/runtime/os1_linux.go
src/runtime/os1_nacl.go
src/runtime/os1_netbsd.go
src/runtime/os1_openbsd.go
src/runtime/os1_plan9.go
src/runtime/os1_windows.go
src/runtime/os3_solaris.go
src/runtime/proc.go