#include <string.h>
#include <errno.h>
-static void
+void inline_speed
kqueue_change (EV_P_ int fd, int filter, int flags, int fflags)
{
struct kevent *ke;
if (kqueue_changecnt > kqueue_eventmax)
{
ev_free (kqueue_events);
- kqueue_eventmax = array_roundsize (struct kevent, kqueue_changecnt);
+ kqueue_eventmax = array_nextsize (sizeof (struct kevent), kqueue_eventmax, kqueue_changecnt);
kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax);
}
if (expect_false (res == kqueue_eventmax))
{
ev_free (kqueue_events);
- kqueue_eventmax = array_roundsize (struct kevent, kqueue_eventmax << 1);
+ kqueue_eventmax = array_nextsize (sizeof (struct kevent), kqueue_eventmax, kqueue_eventmax + 1);
kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax);
}
}
-static int
+int inline_size
kqueue_init (EV_P_ int flags)
{
struct kevent ch, ev;
return EVBACKEND_KQUEUE;
}
-static void
+void inline_size
kqueue_destroy (EV_P)
{
- close (backend_fd);
-
ev_free (kqueue_events);
ev_free (kqueue_changes);
}
-static void
+void inline_size
kqueue_fork (EV_P)
{
close (backend_fd);