1
0
mirror of https://github.com/golang/go synced 2024-11-18 03:04:45 -07:00

runtime: force testing calls of netpoll to run on system stack

Fixes #35053

Change-Id: I31853d434610880044c169e0c1e9732f97ff1bdb
Reviewed-on: https://go-review.googlesource.com/c/go/+/202444
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David du Colombier <0intro@gmail.com>
This commit is contained in:
Ian Lance Taylor 2019-10-22 00:38:08 -07:00
parent 57ad6ef15d
commit 4ec51894ee

View File

@ -35,7 +35,6 @@ var Atoi = atoi
var Atoi32 = atoi32
var Nanotime = nanotime
var Netpoll = netpoll
var NetpollBreak = netpollBreak
var Usleep = usleep
@ -54,6 +53,12 @@ func LFStackPop(head *uint64) *LFNode {
return (*LFNode)(unsafe.Pointer((*lfstack)(head).pop()))
}
func Netpoll(delta int64) {
systemstack(func() {
netpoll(delta)
})
}
func GCMask(x interface{}) (ret []byte) {
systemstack(func() {
ret = getgcmask(x)