runtime: for Solaris, add osinit, and drop duplicate getncpu
Fixes a build breakage introduced in the 1.14beta1 upgrade. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215857
This commit is contained in:
parent
26afdf5070
commit
9e16359ce8
2 changed files with 5 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
9ae2223f91c4ca642885b80d88eb0baf756acf94
|
||||
1d64b76f559c0969ee2a6eb8e0ac9d268713880c
|
||||
|
||||
The first line of this file holds the git revision number of the last
|
||||
merge done from the gofrontend repository.
|
||||
|
|
|
@ -17,12 +17,11 @@ func getPageSize() int32
|
|||
//extern sysconf
|
||||
func sysconf(int32) _C_long
|
||||
|
||||
func getncpu() int32 {
|
||||
n := int32(sysconf(__SC_NPROCESSORS_ONLN))
|
||||
if n < 1 {
|
||||
return 1
|
||||
func osinit() {
|
||||
ncpu = getncpu()
|
||||
if physPageSize == 0 {
|
||||
physPageSize = uintptr(getPageSize())
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sysargs(argc int32, argv **byte) {
|
||||
|
|
Loading…
Add table
Reference in a new issue