mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: run getgcmask on the M stack.
LGTM=rsc R=rsc, khr CC=golang-codereviews https://golang.org/cl/132660043
This commit is contained in:
parent
277ef8fa07
commit
005806cab1
3 changed files with 14 additions and 10 deletions
|
|
@ -111,8 +111,19 @@ func ParForIters(desc *ParFor, tid uint32) (uint32, uint32) {
|
|||
return begin, end
|
||||
}
|
||||
|
||||
// in mgc0.c
|
||||
//go:noescape
|
||||
func GCMask(x interface{}) []byte
|
||||
func getgcmask(data unsafe.Pointer, typ *_type, array **byte, len *uint)
|
||||
|
||||
func GCMask(x interface{}) (ret []byte) {
|
||||
e := (*eface)(unsafe.Pointer(&x))
|
||||
s := (*slice)(unsafe.Pointer(&ret))
|
||||
onM(func() {
|
||||
getgcmask(e.data, e._type, &s.array, &s.len)
|
||||
s.cap = s.len
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func testSchedLocalQueue()
|
||||
func testSchedLocalQueueSteal()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue