228 |
#ifdef USE_POLL |
#ifdef USE_POLL |
229 |
# define BOA_READ POLLIN|POLLPRI |
# define BOA_READ POLLIN|POLLPRI |
230 |
# define BOA_WRITE POLLOUT |
# define BOA_WRITE POLLOUT |
231 |
# define BOA_FD_SET(req, thefd,where) { struct pollfd *my_pfd = &pfds[pfd_len]; req##->pollfd_id = pfd_len++; my_pfd->fd = thefd; my_pfd->events = where; } |
# define BOA_FD_SET(req, thefd,where) { struct pollfd *my_pfd; \ |
232 |
|
my_pfd = ¶ms->pfds[params->pfd_len]; \ |
233 |
|
req->pollfd_id = params->pfd_len++; \ |
234 |
|
my_pfd->fd = thefd; \ |
235 |
|
my_pfd->events = where; \ |
236 |
|
} |
237 |
|
# define BOA_FD_ZERO( ign) /* nothing */ |
238 |
# define BOA_FD_CLR(req, fd, where) /* this doesn't do anything? */ |
# define BOA_FD_CLR(req, fd, where) /* this doesn't do anything? */ |
239 |
#else /* SELECT */ |
#else /* SELECT */ |
240 |
# define BOA_READ ¶ms->block_read_fdset |
# define BOA_READ ¶ms->block_read_fdset |
241 |
# define BOA_WRITE ¶ms->block_write_fdset |
# define BOA_WRITE ¶ms->block_write_fdset |
242 |
# define BOA_FD_SET(req, fd, where) { FD_SET(fd, where); if (fd > params->max_fd) params->max_fd = fd; } |
# define BOA_FD_SET(req, fd, where) { FD_SET(fd, where); if (fd > params->max_fd) params->max_fd = fd; } |
243 |
# define BOA_FD_CLR(req, fd, where) { FD_CLR(fd, where); } |
# define BOA_FD_CLR(req, fd, where) { FD_CLR(fd, where); } |
244 |
|
# define BOA_FD_ZERO( fdset) FD_ZERO( fdset) |
245 |
#endif |
#endif |
246 |
|
|
247 |
/******** MACROS TO CHANGE BLOCK/NON-BLOCK **************/ |
/******** MACROS TO CHANGE BLOCK/NON-BLOCK **************/ |