2016-07-22 18:15:38 +00:00
|
|
|
// Copyright 2014 The Go Authors. All rights reserved.
|
2015-01-15 00:27:56 +00:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2015-10-31 00:59:47 +00:00
|
|
|
// Export guts for testing.
|
|
|
|
|
2015-01-15 00:27:56 +00:00
|
|
|
package runtime
|
|
|
|
|
2016-02-03 21:58:02 +00:00
|
|
|
import "unsafe"
|
|
|
|
|
2022-02-11 14:53:56 -08:00
|
|
|
const MaxArgs = maxArgs
|
|
|
|
|
2016-07-22 18:15:38 +00:00
|
|
|
var (
|
|
|
|
TestingWER = &testingWER
|
|
|
|
OsYield = osyield
|
|
|
|
TimeBeginPeriodRetValue = &timeBeginPeriodRetValue
|
|
|
|
)
|
2016-02-03 21:58:02 +00:00
|
|
|
|
|
|
|
func NumberOfProcessors() int32 {
|
|
|
|
var info systeminfo
|
|
|
|
stdcall1(_GetSystemInfo, uintptr(unsafe.Pointer(&info)))
|
|
|
|
return int32(info.dwnumberofprocessors)
|
|
|
|
}
|
2016-04-13 19:11:16 +00:00
|
|
|
|
|
|
|
func LoadLibraryExStatus() (useEx, haveEx, haveFlags bool) {
|
|
|
|
return useLoadLibraryEx, _LoadLibraryExW != nil, _AddDllDirectory != nil
|
|
|
|
}
|