… | |
… | |
168 | if ((backend_fd = kqueue ()) < 0) |
168 | if ((backend_fd = kqueue ()) < 0) |
169 | return 0; |
169 | return 0; |
170 | |
170 | |
171 | fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */ |
171 | fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */ |
172 | |
172 | |
173 | backend_mintime = 1e-9; /* apparently, they did the right thing in freebsd */ |
173 | backend_mintime = EV_TS_CONST (1e-9); /* apparently, they did the right thing in freebsd */ |
174 | backend_modify = kqueue_modify; |
174 | backend_modify = kqueue_modify; |
175 | backend_poll = kqueue_poll; |
175 | backend_poll = kqueue_poll; |
176 | |
176 | |
177 | kqueue_eventmax = 64; /* initial number of events receivable per poll */ |
177 | kqueue_eventmax = 64; /* initial number of events receivable per poll */ |
178 | kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax); |
178 | kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax); |