]> Cypherpunks repositories - gostls13.git/commit
runtime: implement osyield in Go instead of assembly on Windows
authorqmuntal <quimmuntal@gmail.com>
Thu, 7 Sep 2023 10:41:37 +0000 (12:41 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Wed, 20 Sep 2023 16:15:50 +0000 (16:15 +0000)
commitd73a33f1c34f3cfdc136ac553e887b96614b9ee8
treec167d4e818d3846bae4e4b609c2966d3cecfc850
parentc4af8abae11841d20dfa495a62acc96e5f701f4a
runtime: implement osyield in Go instead of assembly on Windows

Windows APIs are normally not arch-specific, so it's better to
implement them in Go instead of assembly.

It was previously implemented in assembly because it was the only way
to support calls without a valid g. This CL defines a new function,
stdcall_no_g, that can be used in such cases.

Change-Id: I26a223b918c6c462b06ac256bdacf9ddb78752bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/526476
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/runtime/os_windows.go
src/runtime/sys_windows_386.s
src/runtime/sys_windows_amd64.s
src/runtime/sys_windows_arm.s
src/runtime/sys_windows_arm64.s