]> Cypherpunks repositories - gostls13.git/commit
runtime: never allocate new M when jumping time forward
authorAustin Clements <austin@google.com>
Tue, 10 Nov 2015 20:24:59 +0000 (15:24 -0500)
committerAustin Clements <austin@google.com>
Wed, 11 Nov 2015 17:37:42 +0000 (17:37 +0000)
commitf32f2954fbabbb29ce1f7d25c223a9ce25e1e317
tree0b66058fd632f2ea2551c8bb07a44958aff9ed0b
parentf5c42cf88e8c9d75d1738bc2eae81b717071b9d0
runtime: never allocate new M when jumping time forward

When we're jumping time forward, it means everyone is asleep, so there
should always be an M available. Furthermore, this causes both
allocation and write barriers in contexts that may be running without
a P (such as in sysmon).

Hence, replace this allocation with a throw.

Updates #10600.

Change-Id: I2cee70d5db828d0044082878995949edb25dda5f
Reviewed-on: https://go-review.googlesource.com/16815
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/proc.go