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.22 by root, Fri Nov 23 05:28:17 2007 UTC vs.
Revision 1.24 by root, Fri Nov 23 13:08:57 2007 UTC

40 struct kevent *ke; 40 struct kevent *ke;
41 41
42 ++kqueue_changecnt; 42 ++kqueue_changecnt;
43 array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, EMPTY2); 43 array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, EMPTY2);
44 44
45 ke = &kqueue_changes [kqueue_changecnt - 1]; 45 EV_SET (&kqueue_changes [kqueue_changecnt - 1], fd, filter, flags, fflags, 0, 0);
46 memset (ke, 0, sizeof (struct kevent));
47 ke->ident = fd;
48 ke->filter = filter;
49 ke->flags = flags;
50 ke->fflags = fflags;
51} 46}
52 47
53#ifndef NOTE_EOF 48#ifndef NOTE_EOF
54# define NOTE_EOF 0 49# define NOTE_EOF 0
55#endif 50#endif
105 100
106 for (i = 0; i < res; ++i) 101 for (i = 0; i < res; ++i)
107 { 102 {
108 int fd = kqueue_events [i].ident; 103 int fd = kqueue_events [i].ident;
109 104
110 if (kqueue_events [i].flags & EV_ERROR) 105 if (expect_false (kqueue_events [i].flags & EV_ERROR))
111 { 106 {
112 int err = kqueue_events [i].data; 107 int err = kqueue_events [i].data;
113 108
114 /* 109 /*
115 * errors that may happen 110 * errors that may happen

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines