]> Cypherpunks repositories - gostls13.git/commit
runtime: replace sched.mcount int32 with sched.mnext int64
authorAustin Clements <austin@google.com>
Fri, 6 Oct 2017 01:28:01 +0000 (21:28 -0400)
committerAustin Clements <austin@google.com>
Wed, 11 Oct 2017 17:47:16 +0000 (17:47 +0000)
commit6c7bea63096e471f5bc6d256f8beeb303e592c57
tree622b24d50e9a14b96dbf3bac70116a15ba96d493
parentd7ac5ce8a3d0cc0a77e4ea5dc7ef1aa4b39db2f5
runtime: replace sched.mcount int32 with sched.mnext int64

Currently, since Ms never exit, the number of Ms, the number of Ms
ever created, and the ID of the next M are all the same and must be
small. That's about to change, so rename sched.mcount to sched.mnext
to make it clear it's the number of Ms ever created (and the ID of the
next M), change its type to int64, and use mcount() for the number of
Ms. In the next commit, mcount() will become slightly less trivial.

For #20395.

Change-Id: I9af34d36bd72416b5656555d16e8085076f1b196
Reviewed-on: https://go-review.googlesource.com/68750
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/proc.go
src/runtime/runtime2.go
src/runtime/signal_sighandler.go