diff options
| author | qmuntal <quimmuntal@gmail.com> | 2025-08-21 21:23:03 +0200 |
|---|---|---|
| committer | Quim Muntal <quimmuntal@gmail.com> | 2025-09-12 12:00:33 -0700 |
| commit | 889e71c2ac43f22dbd41c0b935acac2e778c8f87 (patch) | |
| tree | e6fe466d35cfc41e3ade6fcfe7fb62988af05580 /src/runtime/export_windows_test.go | |
| parent | cc8a6780acf192b0df2ecfab65bd8c2b5ab1f809 (diff) | |
| download | go-889e71c2ac43f22dbd41c0b935acac2e778c8f87.tar.xz | |
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 <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/export_windows_test.go')
| -rw-r--r-- | src/runtime/export_windows_test.go | 22 |
1 files changed, 5 insertions, 17 deletions
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() } |
