Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(85)

Unified Diff: src/pkg/runtime/netpoll.goc

Issue 35990043: code review 35990043: runtime: add support for GOOS=solaris
Patch Set: diff -r ff8459d06e3f https://code.google.com/p/go Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/pkg/runtime/netpoll.goc
===================================================================
--- a/src/pkg/runtime/netpoll.goc
+++ b/src/pkg/runtime/netpoll.goc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd windows
+// +build darwin dragonfly freebsd linux netbsd openbsd windows solaris
package net
@@ -113,6 +113,12 @@
runtime·lock(pd);
err = checkerr(pd, mode);
if(err == 0) {
+#ifdef GOOS_solaris
+ if(mode == 'r')
+ runtime·netpollarmread(pd->fd);
+ else if(mode == 'w')
+ runtime·netpollarmwrite(pd->fd);
+#endif
while(!netpollblock(pd, mode)) {
err = checkerr(pd, mode);
if(err != 0)
@@ -127,6 +133,12 @@
func runtime_pollWaitCanceled(pd *PollDesc, mode int) {
runtime·lock(pd);
+#ifdef GOOS_solaris
+ if(mode == 'r')
+ runtime·netpollarmread(pd->fd);
+ else if(mode == 'w')
+ runtime·netpollarmwrite(pd->fd);
+#endif
// wait for ioready, ignore closing or timeouts.
while(!netpollblock(pd, mode))
;

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b