diff options
author | Aram H?v?rneanu <aram@mgk.ro> | 2014-01-17 17:58:10 +1300 |
---|---|---|
committer | Aram H?v?rneanu <aram@mgk.ro> | 2014-01-17 17:58:10 +1300 |
commit | 3f4dc43bb9de668a5eec1d86450eb689dde5b2e6 (patch) | |
tree | 177ea827c226d4851ec22837bdc1136b03e4bff8 /src/pkg/runtime/netpoll.goc | |
parent | 0bb619d2ffe25c4995c339f1d5aa346e13d7878d (diff) | |
download | go-3f4dc43bb9de668a5eec1d86450eb689dde5b2e6.tar.gz |
runtime: add support for GOOS=solaris
R=alex.brainman, dave, jsing, gobot, rsc
CC=golang-codereviews
https://codereview.appspot.com/35990043
Committer: Joel Sing <jsing@google.com>
Diffstat (limited to 'src/pkg/runtime/netpoll.goc')
-rw-r--r-- | src/pkg/runtime/netpoll.goc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/pkg/runtime/netpoll.goc b/src/pkg/runtime/netpoll.goc index d27bef167..9b5176645 100644 --- 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 solaris windows package net @@ -113,6 +113,12 @@ func runtime_pollWait(pd *PollDesc, mode int) (err int) { 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_pollWait(pd *PollDesc, mode int) (err int) { 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)) ; |