aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2019-03-27 14:59:10 -0700
committerIan Lance Taylor <iant@golang.org>2019-03-29 14:17:44 +0000
commit70ea70ecfda68abbc5b3c7703dc671f75adde645 (patch)
treeae90f022b5f557b1422ca0a7f8d621229ed6207a /src/runtime/proc.go
parent154e5abfcdb8ffe193d2af4c8ef590f4d9a27008 (diff)
downloadgo-70ea70ecfda68abbc5b3c7703dc671f75adde645.tar.xz
runtime: rename p racectx field to raceprocctx
Both g and p had a racectx field, but they held different kinds of values. The g field held ThreadState values while the p field held Processor values (to use the names used in the C++ code in the compiler_rt support library). Rename the p field to raceprocctx to reduce potential confusion. Change-Id: Iefba0e259d240171e973054c452c3c15bf3f8f8f Reviewed-on: https://go-review.googlesource.com/c/go/+/169960 Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 9e993afba9..78940625b8 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -3956,12 +3956,12 @@ func procresize(nprocs int32) *p {
pp.mcache = allocmcache()
}
}
- if raceenabled && pp.racectx == 0 {
+ if raceenabled && pp.raceprocctx == 0 {
if old == 0 && i == 0 {
- pp.racectx = raceprocctx0
+ pp.raceprocctx = raceprocctx0
raceprocctx0 = 0 // bootstrap
} else {
- pp.racectx = raceproccreate()
+ pp.raceprocctx = raceproccreate()
}
}
}
@@ -4019,8 +4019,8 @@ func procresize(nprocs int32) *p {
gfpurge(p)
traceProcFree(p)
if raceenabled {
- raceprocdestroy(p.racectx)
- p.racectx = 0
+ raceprocdestroy(p.raceprocctx)
+ p.raceprocctx = 0
}
p.gcAssistTime = 0
p.status = _Pdead