Turned out to be pretty quick to implement. Trybots passed for the arm64 commit. We're now waiting for #47019 to land so that we can run the trybots on arm32 too. Then we'll have preemption on Windows on all platforms and can merge those two CLs.
@zx2c4 We've discussed this on the release team, and in general we are okay with this happening for Go 1.18, especially if it can help fix other bugs. It seems the CLs are reviewed and ready to go, so if submitted before Beta 1 they'll undergo all the testing it receives. If it causes new problems, I hope it'll be possible to attribute it back to this change and revert it (the change is very small and so doesn't pose a significant risk of conflicts).
Please note that #47019 is not resolved yet, and though we're hoping to make progress on it (latest update on it is from yesterday), it's hard to say exactly how soon it will be resolved. Perhaps you'd prefer to land this change for the windows/arm64 port independently of the windows/arm one, unless you think it is better to bundle them and land at the same time.
We are in the part of the release process where the goal is to fix bugs and increase stability/reliability of the upcoming release, so if you think this can be integrated safely for 1.18, please proceed. Otherwise it will be safe to target this for 1.19 during its development cycle. Thank you Jason.
This adds support for injecting asynchronous preemption calls on
windows/arm. This code follows sigctxt.pushCall for POSIX OSes
on arm, except we subtract 1 from IP, just as in CL 273727.
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Austin Clements <firstname.lastname@example.org>
Reviewed-by: Patrik Nyblom <email@example.com>
Reviewed-by: Cherry Mui <firstname.lastname@example.org>