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:
Keith Randall 2014-09-05 14:59:31 -07:00
parent 277ef8fa07
commit 005806cab1
3 changed files with 14 additions and 10 deletions

View file

@ -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()