*** empty log message ***

master
Marc Alexander Lehmann 2009-11-24 06:37:23 +00:00
parent 09251e5f33
commit 9356739888
2 changed files with 5 additions and 0 deletions

3
ev.pod
View File

@ -413,6 +413,9 @@ C<EV_WRITE> to C<POLLOUT | POLLERR | POLLHUP>.
=item C<EVBACKEND_EPOLL> (value 4, Linux)
Use the linux-specific epoll(7) interface (for both pre- and post-2.6.9
kernels).
For few fds, this backend is a bit little slower than poll and select,
but it scales phenomenally better. While poll and select usually scale
like O(total_fds) where n is the total number of fds (or the highest fd),

View File

@ -161,6 +161,8 @@ epoll_poll (EV_P_ ev_tstamp timeout)
ev->events = (want & EV_READ ? EPOLLIN : 0)
| (want & EV_WRITE ? EPOLLOUT : 0);
/* pre-2.6.9 kernels require a non-null pointer with EPOLL_CTL_DEL, */
/* which is fortunately easy to do for us. */
if (epoll_ctl (backend_fd, want ? EPOLL_CTL_MOD : EPOLL_CTL_DEL, fd, ev))
{
postfork = 1; /* an error occured, recreate kernel state */