mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00:00
runtime: don't clear procid on netbsd
This is a partial revert of CL 526118. NetBSD uses mp.procid in locking (semawake). unminit is called surprisingly early in mexit, and there is definitely locking after that point, so it isn't safe to clear procid so early. Fixes #62524. Fixes #62531. Change-Id: Iefbef63e84fc0395e255970a301401e1187a910d Reviewed-on: https://go-review.googlesource.com/c/go/+/527057 Reviewed-by: Benny Siegert <bsiegert@gmail.com> Auto-Submit: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
972fc055eb
commit
298e848864
1 changed files with 2 additions and 1 deletions
|
@ -316,7 +316,8 @@ func minit() {
|
|||
//go:nosplit
|
||||
func unminit() {
|
||||
unminitSignals()
|
||||
getg().m.procid = 0
|
||||
// Don't clear procid, it is used by locking (semawake), and locking
|
||||
// must continue working after unminit.
|
||||
}
|
||||
|
||||
// Called from exitm, but not from drop, to undo the effect of thread-owned
|
||||
|
|
Loading…
Reference in a new issue