aboutsummaryrefslogtreecommitdiff
path: root/src/internal/sysinfo/cpuinfo_bsd.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/sysinfo/cpuinfo_bsd.go')
-rw-r--r--src/internal/sysinfo/cpuinfo_bsd.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/internal/sysinfo/cpuinfo_bsd.go b/src/internal/sysinfo/cpuinfo_bsd.go
new file mode 100644
index 0000000000..2c04c8f7d6
--- /dev/null
+++ b/src/internal/sysinfo/cpuinfo_bsd.go
@@ -0,0 +1,14 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build darwin || freebsd || netbsd || openbsd
+
+package sysinfo
+
+import "syscall"
+
+func osCpuInfoName() string {
+ cpu, _ := syscall.Sysctl("machdep.cpu.brand_string")
+ return cpu
+}