]> Cypherpunks repositories - gostls13.git/commit
runtime: fix writebarrier throw in lock_sema
authorRuss Cox <rsc@golang.org>
Tue, 17 Mar 2015 19:07:05 +0000 (15:07 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 17 Mar 2015 19:20:11 +0000 (19:20 +0000)
commit87ec06f96165fcbacf06904cc70a5f19c2a6c00a
tree8e093a1f9a92a8e38584678d1a53a71293103d23
parent41dbcc19ef09a15f464eb3931c60b04e33cf72bb
runtime: fix writebarrier throw in lock_sema

The value in question is really a bit pattern
(a pointer with extra bits thrown in),
so treat it as a uintptr instead, avoiding the
generation of a write barrier when there
might not be a p.

Also add the obligatory //go:nowritebarrier.

Change-Id: I4ea097945dd7093a140f4740bcadca3ce7191971
Reviewed-on: https://go-review.googlesource.com/7667
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/lock_sema.go
src/runtime/runtime2.go