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.7 by root, Tue Nov 6 00:10:04 2007 UTC vs.
Revision 1.9 by root, Tue Nov 6 17:09:45 2007 UTC

44 int idx; 44 int idx;
45 45
46 if (oev == nev) 46 if (oev == nev)
47 return; 47 return;
48 48
49 array_needsize (pollidxs, pollidxmax, fd + 1, pollidx_init); 49 array_needsize (int, pollidxs, pollidxmax, fd + 1, pollidx_init);
50 50
51 idx = pollidxs [fd]; 51 idx = pollidxs [fd];
52 52
53 if (idx < 0) /* need to allocate a new pollfd */ 53 if (idx < 0) /* need to allocate a new pollfd */
54 { 54 {
55 idx = pollcnt++; 55 idx = pollcnt++;
56 array_needsize (polls, pollmax, pollcnt, ); 56 array_needsize (struct pollfd, polls, pollmax, pollcnt, );
57 polls [idx].fd = fd; 57 polls [idx].fd = fd;
58 } 58 }
59 59
60 if (nev) 60 if (nev)
61 polls [idx].events = 61 polls [idx].events =
83 if (errno == EBADF) 83 if (errno == EBADF)
84 fd_ebadf (EV_A); 84 fd_ebadf (EV_A);
85 else if (errno == ENOMEM && !syserr_cb) 85 else if (errno == ENOMEM && !syserr_cb)
86 fd_enomem (EV_A); 86 fd_enomem (EV_A);
87 else if (errno != EINTR) 87 else if (errno != EINTR)
88 syserr (); 88 syserr ("(libev) poll");
89 89
90 return; 90 return;
91 } 91 }
92 92
93 for (i = 0; i < pollcnt; ++i) 93 for (i = 0; i < pollcnt; ++i)
116poll_destroy (EV_P) 116poll_destroy (EV_P)
117{ 117{
118 ev_free (pollidxs); 118 ev_free (pollidxs);
119 ev_free (polls); 119 ev_free (polls);
120} 120}
121

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines