]> Cypherpunks repositories - gostls13.git/commit
runtime: acquire timersLocks around moveTimers
authorIan Lance Taylor <iant@golang.org>
Wed, 13 Nov 2019 01:22:28 +0000 (17:22 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 13 Nov 2019 18:03:37 +0000 (18:03 +0000)
commite762378c42b786233ea13affa1cc2ee132ceefaf
tree5f68f5d1e61cb315e630840a7f513bbe4750aa6a
parentbf4990522263503a1219372cd8f1ee9422b51324
runtime: acquire timersLocks around moveTimers

In the discussion of CL 171828 we decided that it was not necessary to
acquire timersLock around the call to moveTimers, because the world is
stopped. However, that is not correct, as sysmon runs even when the world
is stopped, and it calls timeSleepUntil which looks through the timers.
timeSleepUntil acquires timersLock, but that doesn't help if moveTimers
is running at the same time.

Updates #6239
Updates #27707
Updates #35462

Change-Id: I346c5bde594c4aff9955ae430b37c2b6fc71567f
Reviewed-on: https://go-review.googlesource.com/c/go/+/206938
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/proc.go
src/runtime/time.go