summaryrefslogtreecommitdiff
path: root/libgo/go/runtime/netpoll_epoll.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/runtime/netpoll_epoll.go')
-rw-r--r--libgo/go/runtime/netpoll_epoll.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/libgo/go/runtime/netpoll_epoll.go b/libgo/go/runtime/netpoll_epoll.go
index ced399d781e..2004fbc4da8 100644
--- a/libgo/go/runtime/netpoll_epoll.go
+++ b/libgo/go/runtime/netpoll_epoll.go
@@ -75,9 +75,9 @@ func netpollarm(pd *pollDesc, mode int) {
// polls for ready network connections
// returns list of goroutines that become runnable
-func netpoll(block bool) *g {
+func netpoll(block bool) gList {
if epfd == -1 {
- return nil
+ return gList{}
}
waitms := int32(-1)
if !block {
@@ -94,7 +94,7 @@ retry:
}
goto retry
}
- var gp guintptr
+ var toRun gList
for i := int32(0); i < n; i++ {
ev := &events[i]
if ev.events == 0 {
@@ -110,11 +110,11 @@ retry:
if mode != 0 {
pd := *(**pollDesc)(unsafe.Pointer(&ev.data))
- netpollready(&gp, pd, mode)
+ netpollready(&toRun, pd, mode)
}
}
- if block && gp == 0 {
+ if block && toRun.empty() {
goto retry
}
- return gp.ptr()
+ return toRun
}