ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev_kqueue.c
(Generate patch)

Comparing libev/ev_kqueue.c (file contents):
Revision 1.31 by root, Sun Dec 9 15:06:21 2007 UTC vs.
Revision 1.32 by ayin, Mon Dec 17 11:54:29 2007 UTC

37#include <errno.h> 37#include <errno.h>
38 38
39void inline_speed 39void inline_speed
40kqueue_change (EV_P_ int fd, int filter, int flags, int fflags) 40kqueue_change (EV_P_ int fd, int filter, int flags, int fflags)
41{ 41{
42 struct kevent *ke;
43
44 ++kqueue_changecnt; 42 ++kqueue_changecnt;
45 array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, EMPTY2); 43 array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, EMPTY2);
46 44
47 EV_SET (&kqueue_changes [kqueue_changecnt - 1], fd, filter, flags, fflags, 0, 0); 45 EV_SET (&kqueue_changes [kqueue_changecnt - 1], fd, filter, flags, fflags, 0, 0);
48} 46}
143} 141}
144 142
145int inline_size 143int inline_size
146kqueue_init (EV_P_ int flags) 144kqueue_init (EV_P_ int flags)
147{ 145{
148 struct kevent ch, ev;
149
150 /* Initalize the kernel queue */ 146 /* Initalize the kernel queue */
151 if ((backend_fd = kqueue ()) < 0) 147 if ((backend_fd = kqueue ()) < 0)
152 return 0; 148 return 0;
153 149
154 fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */ 150 fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines