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

Comparing libev/ev.c (file contents):
Revision 1.366 by root, Mon Jan 10 01:58:54 2011 UTC vs.
Revision 1.368 by root, Mon Jan 17 12:11:11 2011 UTC

815 select (0, 0, 0, 0, &tv); 815 select (0, 0, 0, 0, &tv);
816#endif 816#endif
817 } 817 }
818} 818}
819 819
820inline_speed int
821ev_timeout_to_ms (ev_tstamp timeout)
822{
823 int ms = timeout * 1000. + .999999;
824
825 return expect_true (ms) ? ms : timeout < 1e-6 ? 0 : 1;
826}
827
820/*****************************************************************************/ 828/*****************************************************************************/
821 829
822#define MALLOC_ROUND 4096 /* prefer to allocate in chunks of this size, must be 2**n and >> 4 longs */ 830#define MALLOC_ROUND 4096 /* prefer to allocate in chunks of this size, must be 2**n and >> 4 longs */
823 831
824/* find a suitable new size for the given array, */ 832/* find a suitable new size for the given array, */
2110 2118
2111 for (pri = NUMPRI; pri--; ) 2119 for (pri = NUMPRI; pri--; )
2112 while (pendingcnt [pri]) 2120 while (pendingcnt [pri])
2113 { 2121 {
2114 ANPENDING *p = pendings [pri] + --pendingcnt [pri]; 2122 ANPENDING *p = pendings [pri] + --pendingcnt [pri];
2115
2116 /*assert (("libev: non-pending watcher on pending list", p->w->pending));*/
2117 /* ^ this is no longer true, as pending_w could be here */
2118 2123
2119 p->w->pending = 0; 2124 p->w->pending = 0;
2120 EV_CB_INVOKE (p->w, p->events); 2125 EV_CB_INVOKE (p->w, p->events);
2121 EV_FREQUENT_CHECK; 2126 EV_FREQUENT_CHECK;
2122 } 2127 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines