aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2019-04-10 21:04:36 -0700
committerIan Lance Taylor <iant@golang.org>2019-10-22 19:35:04 +0000
commit48eb79ec2197aeea0eb43597b00cad1ebcad61d2 (patch)
treeddfba9b5bb05e6d03dd4cb6482a13b94212ebafd /src/runtime/proc.go
parenta813d3c788b4ec58032616e8d269ee65d1b10085 (diff)
downloadgo-48eb79ec2197aeea0eb43597b00cad1ebcad61d2.tar.xz
runtime: add new modtimer function
This adds a new field to P, adjustTimers, that tells the P that one of its existing timers was modified to be earlier, and that it therefore needs to resort them. Updates #27707 Change-Id: I4c5f5b51ed116f1d898d3f87cdddfa1b552337f8 Reviewed-on: https://go-review.googlesource.com/c/go/+/171832 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 09ef784a04..edff454491 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -4122,6 +4122,7 @@ func (pp *p) destroy() {
// The world is stopped so we don't need to hold timersLock.
moveTimers(plocal, pp.timers)
pp.timers = nil
+ pp.adjustTimers = 0
}
// If there's a background worker, make it runnable and put
// it on the global queue so it can clean itself up.