X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/6e0418ec92a0b2bfbbe75790bb015bcd022f5dad..40cacc255e3a1a5563eb1599fbea5f5d38ceb8eb:/ev_epoll.c diff --git a/ev_epoll.c b/ev_epoll.c index 4edbecd..38fd304 100644 --- a/ev_epoll.c +++ b/ev_epoll.c @@ -74,12 +74,12 @@ epoll_poll (EV_P_ ev_tstamp timeout) if (expect_false (eventcnt == epoll_eventmax)) { ev_free (epoll_events); - epoll_eventmax = array_roundsize (epoll_events, epoll_eventmax << 1); + epoll_eventmax = array_nextsize (sizeof (struct epoll_event), epoll_eventmax, epoll_eventmax + 1); epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax); } } -static int +int inline_size epoll_init (EV_P_ int flags) { backend_fd = epoll_create (256); @@ -99,15 +99,13 @@ epoll_init (EV_P_ int flags) return EVBACKEND_EPOLL; } -static void +void inline_size epoll_destroy (EV_P) { - close (backend_fd); - ev_free (epoll_events); } -static void +void inline_size epoll_fork (EV_P) { close (backend_fd);