]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: force testing calls of netpoll to run on system stack
authorIan Lance Taylor <iant@golang.org>
Tue, 22 Oct 2019 07:38:08 +0000 (00:38 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 22 Oct 2019 08:46:40 +0000 (08:46 +0000)
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>
src/runtime/export_test.go

index 42a456c7079bfb265fbc7a0a6d1eb5b9184717b9..f5b44a29a0040e33163160bd9c1452e0ebf8c29a 100644 (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)