]> Cypherpunks repositories - gostls13.git/commit
runtime: implement high resolution timer on windows arm/arm64
authorqmuntal <quimmuntal@gmail.com>
Fri, 24 Feb 2023 17:15:32 +0000 (18:15 +0100)
committerGopher Robot <gobot@golang.org>
Mon, 13 Mar 2023 14:20:41 +0000 (14:20 +0000)
commitb6f29d23654eba09209db00704ccef1f01a60c71
treefbf02d071ad1a82d7bd6a85d014881543a936070
parentb561ebab46124c3542ee2d67c68ca770b67cb8dc
runtime: implement high resolution timer on windows arm/arm64

This CL moves the usleep2HighRes from assembly to good old Go.
This is safe because since CL 288793 usleep is always called with
a g, else one wold have to call usleep_no_g. This condition was
not enforced when high resolution timers were first implemented
on Windows (CL 248699), so the implementation was done in assembly.

Other than removing a bunch of obscure assembly code, this CL makes
high resolution timers work on windows arm/arm64 by free, as the
system calls are the same in all windows platforms.

Change-Id: I41ecf78026fd7e11e85258a411ae074a77e8c7fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/471142
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.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