Displaying 1 result from an estimated 1 matches for "dump_pollfds".
2013 Feb 19
13
[PATCH] mini-os: implement poll(2)
...>
+#include <poll.h>
#include <sys/types.h>
#include <sys/unistd.h>
@@ -678,6 +679,29 @@ static void dump_set(int nfds, fd_set *readfds, fd_set *writefds, fd_set *except
#define dump_set(nfds, readfds, writefds, exceptfds, timeout)
#endif
+#ifdef LIBC_DEBUG
+static void dump_pollfds(struct pollfd *pfd, int nfds, int timeout)
+{
+ int i, comma, fd;
+
+ printk("[");
+ comma = 0;
+ for (i = 0; i < nfds; i++) {
+ fd = pfd[i].fd;
+ if (comma)
+ printk(", ");
+ printk("%d(%c)/%02x", fd, file_types[files[fd]...