]> Cypherpunks repositories - gostls13.git/commit
runtime: use acquirem/releasem more widely
authorAustin Clements <austin@google.com>
Tue, 26 Mar 2019 01:16:33 +0000 (21:16 -0400)
committerAustin Clements <austin@google.com>
Fri, 5 Apr 2019 19:00:12 +0000 (19:00 +0000)
commitea9859f858b603cbf49f0a930f83c56a716490a4
tree336503d7abb5ebf251b7efadbc656c64a0b773ef
parentac40a7fb9e2650f0a0999bea7639477337fe161e
runtime: use acquirem/releasem more widely

We've copy-pasted the pattern of releasem in many places. This CL
replaces almost everywhere that manipulates g.m.locks and g.preempt
with calls to acquirem/releasem. There are a few where we do something
more complicated, like where exitsyscall has to restore the stack
bound differently depending on the preempt flag, which this CL leaves
alone.

Change-Id: Ia7a46c261daea6e7802b80e7eb9227499f460433
Reviewed-on: https://go-review.googlesource.com/c/go/+/170064
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/proc.go