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

Comparing libev/ev_poll.c (file contents):
Revision 1.4 by root, Sun Nov 4 15:58:50 2007 UTC vs.
Revision 1.6 by root, Sun Nov 4 23:14:11 2007 UTC

40 40
41static void 41static void
42poll_modify (EV_P_ int fd, int oev, int nev) 42poll_modify (EV_P_ int fd, int oev, int nev)
43{ 43{
44 int idx; 44 int idx;
45
46 if (oev == nev)
47 return;
48
45 array_needsize (pollidxs, pollidxmax, fd + 1, pollidx_init); 49 array_needsize (pollidxs, pollidxmax, fd + 1, pollidx_init);
46 50
47 idx = pollidxs [fd]; 51 idx = pollidxs [fd];
48 52
49 if (idx < 0) /* need to allocate a new pollfd */ 53 if (idx < 0) /* need to allocate a new pollfd */
100 method_fudge = 1e-3; /* needed to compensate for select returning early, very conservative */ 104 method_fudge = 1e-3; /* needed to compensate for select returning early, very conservative */
101 method_modify = poll_modify; 105 method_modify = poll_modify;
102 method_poll = poll_poll; 106 method_poll = poll_poll;
103 107
104 pollidxs = 0; pollidxmax = 0; 108 pollidxs = 0; pollidxmax = 0;
105 polls = 0; pollsmax = 0; pollscnt = 0; 109 polls = 0; pollmax = 0; pollcnt = 0;
106 110
107 return EVMETHOD_POLL; 111 return EVMETHOD_POLL;
108} 112}
109 113
110static void 114static void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines