diff options
Diffstat (limited to 'libgo/go/runtime/netpoll_solaris.go')
-rw-r--r-- | libgo/go/runtime/netpoll_solaris.go | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libgo/go/runtime/netpoll_solaris.go b/libgo/go/runtime/netpoll_solaris.go index cc6754cd2eb..e1e73857f40 100644 --- a/libgo/go/runtime/netpoll_solaris.go +++ b/libgo/go/runtime/netpoll_solaris.go @@ -96,8 +96,12 @@ func netpollinit() { return } - print("netpollinit: failed to create port (", errno(), ")\n") - throw("netpollinit: failed to create port") + print("runtime: port_create failed (errno=", errno(), ")\n") + throw("runtime: netpollinit failed") +} + +func netpolldescriptor() uintptr { + return uintptr(portfd) } func netpollopen(fd uintptr, pd *pollDesc) int32 { @@ -139,8 +143,8 @@ func netpollupdate(pd *pollDesc, set, clear uint32) { } if events != 0 && port_associate(portfd, _PORT_SOURCE_FD, pd.fd, events, uintptr(unsafe.Pointer(pd))) != 0 { - print("netpollupdate: failed to associate (", errno(), ")\n") - throw("netpollupdate: failed to associate") + print("runtime: port_associate failed (errno=", errno(), ")\n") + throw("runtime: netpollupdate failed") } pd.user = events } @@ -154,7 +158,7 @@ func netpollarm(pd *pollDesc, mode int) { case 'w': netpollupdate(pd, _POLLOUT, 0) default: - throw("netpollarm: bad mode") + throw("runtime: bad mode") } unlock(&pd.lock) } @@ -177,8 +181,8 @@ retry: var n uint32 = 1 if port_getn(portfd, &events[0], uint32(len(events)), &n, wait) < 0 { if e := errno(); e != _EINTR { - print("runtime: port_getn on fd ", portfd, " failed with ", e, "\n") - throw("port_getn failed") + print("runtime: port_getn on fd ", portfd, " failed (errno=", e, ")\n") + throw("runtime: netpoll failed") } goto retry } |