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>
//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