mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
41dbcc19ef
commit
87ec06f961
2 changed files with 5 additions and 3 deletions
|
|
@ -301,7 +301,7 @@ type m struct {
|
|||
freghi [16]uint32 // d[i] msb and f[i+16]
|
||||
fflag uint32 // floating point compare flags
|
||||
locked uint32 // tracking for lockosthread
|
||||
nextwaitm *m // next m waiting for lock
|
||||
nextwaitm uintptr // next m waiting for lock
|
||||
waitsema uintptr // semaphore for parking on locks
|
||||
waitsemacount uint32
|
||||
waitsemalock uint32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue