mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: implement xadduintptr and update system mstats using it
The motivation is that sysAlloc/Free() currently aren't safe to be called without a valid G, because arm's xadd64() uses locks that require a valid G. The solution here was proposed by Dmitry Vyukov: use xadduintptr() instead of xadd64(), until arm can support xadd64 on all of its architectures (not a trivial task for arm). Change-Id: I250252079357ea2e4360e1235958b1c22051498f Reviewed-on: https://go-review.googlesource.com/9002 Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This commit is contained in:
parent
8566979972
commit
6ad33be2d9
18 changed files with 189 additions and 39 deletions
|
|
@ -21,6 +21,7 @@ var F64toint = f64toint
|
|||
var Entersyscall = entersyscall
|
||||
var Exitsyscall = exitsyscall
|
||||
var LockedOSThread = lockedOSThread
|
||||
var Xadduintptr = xadduintptr
|
||||
|
||||
var FuncPC = funcPC
|
||||
|
||||
|
|
@ -129,3 +130,5 @@ var Write = write
|
|||
|
||||
func Envs() []string { return envs }
|
||||
func SetEnvs(e []string) { envs = e }
|
||||
|
||||
var BigEndian = _BigEndian
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue