]> Cypherpunks repositories - gostls13.git/commit
runtime: abstract M preemption check into a function
authorAustin Clements <austin@google.com>
Fri, 4 Oct 2019 22:54:00 +0000 (18:54 -0400)
committerAustin Clements <austin@google.com>
Fri, 25 Oct 2019 23:25:36 +0000 (23:25 +0000)
commitd1969015b4ac29be4f518b94817d3f525380639d
tree43864832e4bb2cd623f6c6b423f1011b6f2a5d92
parent60586034713cc94477868fb6911f34cfcc6a1ba4
runtime: abstract M preemption check into a function

We check whether an M is preemptible in a surprising number of places.
Put it in one function.

For #10958, #24543.

Change-Id: I305090fdb1ea7f7a55ffe25851c1e35012d0d06c
Reviewed-on: https://go-review.googlesource.com/c/go/+/201439
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/mgcwork.go
src/runtime/preempt.go
src/runtime/proc.go
src/runtime/stack.go