X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/2286b0bd1148eb87826698f86c8224f93ff502cd..8ee8df9cf84f6ae595eb82ebe7e5eb119112087e:/ev_epoll.c?ds=sidebyside diff --git a/ev_epoll.c b/ev_epoll.c index d03f8a5..4793212 100644 --- a/ev_epoll.c +++ b/ev_epoll.c @@ -1,4 +1,6 @@ /* + * libev epoll fd activity backend + * * Copyright (c) 2007 Marc Alexander Lehmann * All rights reserved. * @@ -55,7 +57,7 @@ epoll_postfork_child (void) /* re-register interest in fds */ for (fd = 0; fd < anfdmax; ++fd) - if (anfds [fd].events && !(anfds [fd].events & EV_REIFY))//D + if (anfds [fd].events)//D epoll_modify (fd, EV_NONE, anfds [fd].events); } @@ -79,10 +81,10 @@ epoll_poll (ev_tstamp timeout) ); /* if the receive array was full, increase its size */ - if (eventcnt == eventmax) + if (expect_false (eventcnt == eventmax)) { free (events); - eventmax += eventmax >> 1; + eventmax = array_roundsize (events, eventmax << 1); events = malloc (sizeof (struct epoll_event) * eventmax); } }