search for: fd_revent

Displaying 1 result from an estimated 1 matches for "fd_revent".

Did you mean: fd_revents
2013 Jan 03
20
[PATCH] Switch to poll in xenconsoled's io loop.
...fd *fd_to_pollfd[MAX_POLL_FDS]; + int nr_fds; +#define SET_FDS(_fd, _events) do { \ + if (_fd >= MAX_POLL_FDS) \ + break; \ + fds[nr_fds].fd = (_fd); \ + fds[nr_fds].events = (_events); \ + fd_to_pollfd[(_fd)] = &fds[nr_fds]; \ + nr_fds++; \ + } while (0) +#define FD_REVENTS(_fd) (((_fd) < MAX_POLL_FDS && fd_to_pollfd[(_fd)]) ? \ + fd_to_pollfd[(_fd)]->revents : 0) + + nr_fds = 0; + memset(fds, 0, sizeof(fds)); + memset(fd_to_pollfd, 0, sizeof(fd_to_pollfd)); + + SET_FDS(xs_fileno(xs), POLLIN); + + if (log_hv) + SET_FDS(xc_evtchn_fd(xce_handle)...