runtime: convert semaRoot.nwait to atomic type

For #53821

Change-Id: I686fe81268f70acc6a4c3e6b1d3ed0e07bb0d61c
Reviewed-on: https://go-review.googlesource.com/c/go/+/425775
Run-TryBot: xie cui <523516579@qq.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
This commit is contained in:
cuiweixie 2022-08-26 10:27:57 +08:00 committed by Michael Knyszek
parent 6e74c4116a
commit fa0e3bffb4
2 changed files with 8 additions and 8 deletions

View file

@ -1164,7 +1164,7 @@ var Semrelease1 = semrelease1
func SemNwait(addr *uint32) uint32 {
root := semtable.rootFor(addr)
return atomic.Load(&root.nwait)
return root.nwait.Load()
}
const SemTableSize = semTabSize