diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2022-05-18 23:47:03 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2022-05-19 14:18:41 +0000 |
| commit | b93ceefa7b47167f7bc9ec471905c136b234d34f (patch) | |
| tree | 94358f5ce1858fe73691e4e15ef8cbe36815d872 /src/runtime/proc.go | |
| parent | 128279e5034ca29bad4320eef81a8abd5b40ea7e (diff) | |
| download | go-b93ceefa7b47167f7bc9ec471905c136b234d34f.tar.xz | |
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>
Diffstat (limited to 'src/runtime/proc.go')
| -rw-r--r-- | src/runtime/proc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index f5e528e8e9..7ac6279c40 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -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 |
