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

Comparing libev/ev.c (file contents):
Revision 1.31 by root, Thu Nov 1 09:05:33 2007 UTC vs.
Revision 1.32 by root, Thu Nov 1 09:21:51 2007 UTC

168static int pendingmax, pendingcnt; 168static int pendingmax, pendingcnt;
169 169
170static void 170static void
171event (W w, int events) 171event (W w, int events)
172{ 172{
173 if (w->pending)
174 {
175 pendings [w->pending - 1].events |= events;
176 return;
177 }
178
173 w->pending = ++pendingcnt; 179 w->pending = ++pendingcnt;
174 array_needsize (pendings, pendingmax, pendingcnt, ); 180 array_needsize (pendings, pendingmax, pendingcnt, );
175 pendings [pendingcnt - 1].w = w; 181 pendings [pendingcnt - 1].w = w;
176 pendings [pendingcnt - 1].events = events; 182 pendings [pendingcnt - 1].events = events;
177} 183}
255 for (fd = 0; fd < anfdmax; ++fd) 261 for (fd = 0; fd < anfdmax; ++fd)
256 if (anfds [fd].events) 262 if (anfds [fd].events)
257 if (fcntl (fd, F_GETFD) == -1 && errno == EBADF) 263 if (fcntl (fd, F_GETFD) == -1 && errno == EBADF)
258 while (anfds [fd].head) 264 while (anfds [fd].head)
259 { 265 {
266 ev_io_stop (anfds [fd].head);
260 event ((W)anfds [fd].head, EV_ERROR | EV_READ | EV_WRITE | EV_TIMEOUT); 267 event ((W)anfds [fd].head, EV_ERROR | EV_READ | EV_WRITE | EV_TIMEOUT);
261 ev_io_stop (anfds [fd].head);
262 } 268 }
263} 269}
264 270
265/*****************************************************************************/ 271/*****************************************************************************/
266 272

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines