pkg/platform: replace use of deprecated syscall.Syscall
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
7ca38d64d2
commit
87019144f6
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ const (
|
|||
// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …)
|
||||
func runtimeArchitecture() (string, error) {
|
||||
var sysinfo systeminfo
|
||||
syscall.Syscall(procGetSystemInfo.Addr(), 1, uintptr(unsafe.Pointer(&sysinfo)), 0, 0)
|
||||
_, _, _ = syscall.SyscallN(procGetSystemInfo.Addr(), uintptr(unsafe.Pointer(&sysinfo)))
|
||||
switch sysinfo.wProcessorArchitecture {
|
||||
case ProcessorArchitecture64, ProcessorArchitectureIA64:
|
||||
return "x86_64", nil
|
||||
|
@ -58,6 +58,6 @@ func runtimeArchitecture() (string, error) {
|
|||
// NumProcs returns the number of processors on the system
|
||||
func NumProcs() uint32 {
|
||||
var sysinfo systeminfo
|
||||
syscall.Syscall(procGetSystemInfo.Addr(), 1, uintptr(unsafe.Pointer(&sysinfo)), 0, 0)
|
||||
_, _, _ = syscall.SyscallN(procGetSystemInfo.Addr(), uintptr(unsafe.Pointer(&sysinfo)))
|
||||
return sysinfo.dwNumberOfProcessors
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue