diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2019-02-08 09:25:05 +0100 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-02-26 22:56:59 +0000 |
| commit | c55eeeb718b0dfd008f0d722c8b8d05f8b02d62b (patch) | |
| tree | b2b67cd0ed74418c3cd976b65965a01cbc5ba674 /src/bytes/buffer.go | |
| parent | ea65d015b838f2ca75debacacbbb039fe5e96b26 (diff) | |
| download | go-c55eeeb718b0dfd008f0d722c8b8d05f8b02d62b.tar.xz | |
runtime: use hw.ncpuonline sysctl in getncpu on openbsd
The number of CPUs reported by the hw.ncpu sysctl is twice as high as
the actual number of CPUs running on OpenBSD 6.4. with hyperthreading
disabled (hw.smt=0). Try hw.cpuonline first and fall back to hw.ncpu
in case it fails (which is the case on older OpenBSD before 6.4).
Fixes #30127
Change-Id: Id091234b8038cc9f7c40519d039fc1a05437c40d
Reviewed-on: https://go-review.googlesource.com/c/161757
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/bytes/buffer.go')
0 files changed, 0 insertions, 0 deletions
