runtime: fix arm/arm64/ppc64/mips64 to dropm when necessary

Fixes #13881.

Change-Id: Idff77db381640184ddd2b65022133bb226168800
Reviewed-on: https://go-review.googlesource.com/18449
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Ian Lance Taylor 2016-01-08 16:56:02 -08:00
parent 9439fa1078
commit c02aa463db
8 changed files with 110 additions and 12 deletions

View file

@ -1443,6 +1443,11 @@ func dropm() {
unlockextra(mp)
}
// A helper function for EnsureDropM.
func getm() uintptr {
return uintptr(unsafe.Pointer(getg().m))
}
var extram uintptr
// lockextra locks the extra list and returns the list head.