github.com/q45/go@v0.0.0-20151101211701-a4fb8c13db3f/src/runtime/export_windows_test.go (about) 1 // Copyright 2014 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Export guts for testing. 6 7 package runtime 8 9 import "unsafe" 10 11 var ( 12 TestingWER = &testingWER 13 TimeBeginPeriodRetValue = &timeBeginPeriodRetValue 14 ) 15 16 func NumberOfProcessors() int32 { 17 var info systeminfo 18 stdcall1(_GetSystemInfo, uintptr(unsafe.Pointer(&info))) 19 return int32(info.dwnumberofprocessors) 20 }