mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: convert schedt.pollUntil to atomic type
Note that this converts pollUntil from uint64 to int64, the type used by nanotime(). For #53821. Change-Id: Iec9ec7e09d3350552561d0708ba6ea9e8a8ae7ab Reviewed-on: https://go-review.googlesource.com/c/go/+/419443 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
5d7d50111f
commit
0fc774a68f
3 changed files with 5 additions and 7 deletions
|
|
@ -758,10 +758,9 @@ type p struct {
|
|||
}
|
||||
|
||||
type schedt struct {
|
||||
// accessed atomically. keep at top to ensure alignment on 32-bit systems.
|
||||
goidgen atomic.Uint64
|
||||
lastpoll atomic.Int64 // time of last network poll, 0 if currently polling
|
||||
pollUntil uint64 // time to which current poll is sleeping
|
||||
pollUntil atomic.Int64 // time to which current poll is sleeping
|
||||
|
||||
lock mutex
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue