From 889e71c2ac43f22dbd41c0b935acac2e778c8f87 Mon Sep 17 00:00:00 2001 From: qmuntal Date: Thu, 21 Aug 2025 21:23:03 +0200 Subject: runtime: move Windows types and consts to internal/runtime/syscall/windows This CL doesn't change any behavior, it just moves code around to reduce the size of the runtime package and remove some duplicated symbols. Updates #51087. Cq-Include-Trybots: luci.golang.try:gotip-windows-arm64 Change-Id: I3d3e5f214f045c24fb5d4050d56e7b0822a6e4b5 Reviewed-on: https://go-review.googlesource.com/c/go/+/698098 Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Pratt --- src/runtime/export_windows_test.go | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'src/runtime/export_windows_test.go') diff --git a/src/runtime/export_windows_test.go b/src/runtime/export_windows_test.go index caaf2dae51..f44e24bbac 100644 --- a/src/runtime/export_windows_test.go +++ b/src/runtime/export_windows_test.go @@ -7,7 +7,7 @@ package runtime import ( - "internal/runtime/sys" + "internal/runtime/syscall/windows" "unsafe" ) @@ -17,23 +17,11 @@ var ( ) func NumberOfProcessors() int32 { - var info systeminfo + var info windows.SystemInfo stdcall(_GetSystemInfo, uintptr(unsafe.Pointer(&info))) - return int32(info.dwnumberofprocessors) + return int32(info.NumberOfProcessors) } -type ContextStub struct { - context -} - -func (c ContextStub) GetPC() uintptr { - return c.ip() -} - -func NewContextStub() *ContextStub { - var ctx context - ctx.set_ip(sys.GetCallerPC()) - ctx.set_sp(sys.GetCallerSP()) - ctx.set_fp(getcallerfp()) - return &ContextStub{ctx} +func GetCallerFp() uintptr { + return getcallerfp() } -- cgit v1.3-5-g9baa