aboutsummaryrefslogtreecommitdiff
path: root/src/debug/macho/testdata
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2019-10-25 16:17:41 -0400
committerAustin Clements <austin@google.com>2019-11-20 17:13:59 +0000
commitb89b4623eb70cbdc6b0aea43a5a826b7a26f20a7 (patch)
treedbe03bd384e2b2cf0ce13dd773a8c269c08612f7 /src/debug/macho/testdata
parent6fd467ee29226bf4b875921b7cb3b692c9db52ef (diff)
downloadgo-b89b4623eb70cbdc6b0aea43a5a826b7a26f20a7.tar.xz
runtime: support preemption on windows/{386,amd64}
This implements preemptM on Windows using SuspendThead and ResumeThread. Unlike on POSIX platforms, preemptM on Windows happens synchronously. This means we need a make a few other tweaks to suspendG: 1. We need to CAS the G back to _Grunning before doing the preemptM, or there's a good chance we'll just catch the G spinning on its status in the runtime, which won't be preemptible. 2. We need to rate-limit preemptM attempts. Otherwise, if the first attempt catches the G at a non-preemptible point, the busy loop in suspendG may hammer it so hard that it never makes it past that non-preemptible point. Updates #10958, #24543. Change-Id: Ie53b098811096f7e45d864afd292dc9e999ce226 Reviewed-on: https://go-review.googlesource.com/c/go/+/204340 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/debug/macho/testdata')
0 files changed, 0 insertions, 0 deletions