mirror of
https://github.com/golang/go
synced 2024-11-17 03:14:50 -07:00
runtime: use osyield in runqgrab on netbsd
NetBSD appears to have the same issue OpenBSD had in runqgrab. See issue #52475 for more details. For #35166. Change-Id: Ie53192d26919b4717bc0d61cadd88d688ff38bb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/407139 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
128279e503
commit
b93ceefa7b
@ -5955,7 +5955,7 @@ func runqgrab(_p_ *p, batch *[256]guintptr, batchHead uint32, stealRunNextG bool
|
||||
// between different Ps.
|
||||
// A sync chan send/recv takes ~50ns as of time of
|
||||
// writing, so 3us gives ~50x overshoot.
|
||||
if GOOS != "windows" && GOOS != "openbsd" {
|
||||
if GOOS != "windows" && GOOS != "openbsd" && GOOS != "netbsd" {
|
||||
usleep(3)
|
||||
} else {
|
||||
// On some platforms system timer granularity is
|
||||
|
Loading…
Reference in New Issue
Block a user