public static int poll (Pollfd [] fds, uint nfds, int timeout) { if (fds.Length < nfds) throw new ArgumentOutOfRangeException ("fds", "Must refer to at least `nfds' elements"); _pollfd[] send = new _pollfd[nfds]; for (int i = 0; i < send.Length; i++) { send [i].fd = fds [i].fd; send [i].events = UnixConvert.FromPollEvents (fds [i].events); } int r = sys_poll (send, nfds, timeout); for (int i = 0; i < send.Length; i++) { fds [i].revents = UnixConvert.ToPollEvents (send [i].revents); } return r; }
private static int sys_poll (_pollfd[] ufds, uint nfds, int timeout) { throw new System.NotImplementedException(); }
private static extern int sys_poll (_pollfd[] ufds, uint nfds, int timeout);