Displaying 1 result from an estimated 1 matches for "_nfds".
Did you mean:
nfds
2013 Feb 19
13
[PATCH] mini-os: implement poll(2)
...+#else
+#define dump_pollfds(pfds, nfds, timeout)
+#endif
+
/* Just poll without blocking */
static int select_poll(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds)
{
@@ -983,6 +1007,71 @@ out:
return ret;
}
+/* Wrap around select */
+int poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout)
+{
+ int ret;
+ int i, fd;
+ struct timeval _timeo, *timeo = NULL;
+ fd_set rfds, wfds, efds;
+ int max_fd = -1;
+
+ DEBUG("poll(");
+ dump_pollfds(_pfd, _nfds, _timeout);
+ DEBUG(")\n");
+
+ if (_timeout != -1) {
+ /* Timeout in...