func runtime_pollWait(pd *PollDesc, mode int) (err int) {
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
+ // As for now only Solaris uses level-triggered IO.
+ if(Solaris)
+ runtime·netpollarm(pd->fd, mode);
while(!netpollblock(pd, mode, false)) {
err = checkerr(pd, mode);
if(err != 0)
}
func runtime_pollWaitCanceled(pd *PollDesc, mode int) {
-#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.
+ // This function is used only on windows after a failed attempt to cancel
+ // a pending async IO operation. Wait for ioready, ignore closing or timeouts.
while(!netpollblock(pd, mode, true))
;
}
return -res;
}
+void
+runtime·netpollarm(uintptr fd, int32 mode)
+{
+ USED(fd, mode);
+ runtime·throw("unused");
+}
+
// polls for ready network connections
// returns list of goroutines that become runnable
G*
return 0;
}
+void
+runtime·netpollarm(uintptr fd, int32 mode)
+{
+ USED(fd, mode);
+ runtime·throw("unused");
+}
+
// Polls for ready network connections.
// Returns list of goroutines that become runnable.
G*
return 0;
}
+void
+runtime·netpollarm(uintptr fd, int32 mode)
+{
+ USED(fd, mode);
+ runtime·throw("unused");
+}
+
// Polls for completed network IO.
// Returns list of goroutines that become runnable.
G*
int32 runtime·netpollclose(uintptr);
void runtime·netpollready(G**, PollDesc*, int32);
uintptr runtime·netpollfd(PollDesc*);
-void runtime·netpollarmread(uintptr fd);
-void runtime·netpollarmwrite(uintptr fd);
+void runtime·netpollarm(uintptr, int32);
void runtime·crash(void);
void runtime·parsedebugvars(void);
void _rt0_go(void);