Skip to content

Commit ab0272b

Browse files
committed
export CPUID information
1 parent 7e7a0f9 commit ab0272b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/runtime/os_tamago_amd64.go

+9
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
package runtime
88

9+
import "internal/cpu"
10+
911
// the following variables must be provided externally
1012
var ramStart uint64
1113
var ramSize uint64
@@ -28,3 +30,10 @@ func MemRegion() (start uint64, end uint64) {
2830
func TextRegion() (start uint64, end uint64) {
2931
return uint64(firstmoduledata.text), uint64(firstmoduledata.etext)
3032
}
33+
34+
// CPU returns the CPU name given by the vendor.
35+
// If the CPU name can not be determined an
36+
// empty string is returned.
37+
func CPU() string {
38+
return cpu.Name()
39+
}

0 commit comments

Comments
 (0)