]> Cypherpunks repositories - gostls13.git/commit
runtime: rename m.gcing to m.preemptoff and make it a string
authorAustin Clements <austin@google.com>
Fri, 30 Jan 2015 20:30:41 +0000 (15:30 -0500)
committerAustin Clements <austin@google.com>
Mon, 2 Feb 2015 19:34:51 +0000 (19:34 +0000)
commit28b51184156e1261bb92e7ec4050a794dd606fa6
tree8d8659e3e706f687b241e8068ef80ff80987c3d2
parentf95becaddb539a45cc9bedbbbc9ee4a2433c1ab5
runtime: rename m.gcing to m.preemptoff and make it a string

m.gcing has become overloaded to mean "don't preempt this g" in
general.  Once the garbage collector is preemptible, the one thing it
*won't* mean is that we're in the garbage collector.

So, rename gcing to "preemptoff" and make it a string giving a reason
that preemption is disabled.  gcing was never set to anything but 0 or
1, so we don't have to worry about there being a stack of reasons.

Change-Id: I4337c29e8e942e7aa4f106fc29597e1b5de4ef46
Reviewed-on: https://go-review.googlesource.com/3660
Reviewed-by: Russ Cox <rsc@golang.org>
13 files changed:
src/runtime/debug.go
src/runtime/lock_futex.go
src/runtime/lock_sema.go
src/runtime/malloc.go
src/runtime/mem.go
src/runtime/mgc.go
src/runtime/mprof.go
src/runtime/panic.go
src/runtime/panic1.go
src/runtime/proc1.go
src/runtime/runtime2.go
src/runtime/stack1.go
src/runtime/trace.go