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

Comparing libev/ev.c (file contents):
Revision 1.367 by root, Tue Jan 11 02:15:58 2011 UTC vs.
Revision 1.369 by root, Sun Jan 23 18:53:06 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, */
1343 char dummy; 1351 char dummy;
1344 /* see discussion in evpipe_write when you think this read should be recv in win32 */ 1352 /* see discussion in evpipe_write when you think this read should be recv in win32 */
1345 read (evpipe [0], &dummy, 1); 1353 read (evpipe [0], &dummy, 1);
1346 } 1354 }
1347 1355
1356#if EV_SIGNAL_ENABLE
1348 if (sig_pending) 1357 if (sig_pending)
1349 { 1358 {
1350 sig_pending = 0; 1359 sig_pending = 0;
1351 1360
1352 for (i = EV_NSIG - 1; i--; ) 1361 for (i = EV_NSIG - 1; i--; )
1353 if (expect_false (signals [i].pending)) 1362 if (expect_false (signals [i].pending))
1354 ev_feed_signal_event (EV_A_ i + 1); 1363 ev_feed_signal_event (EV_A_ i + 1);
1355 } 1364 }
1365#endif
1356 1366
1357#if EV_ASYNC_ENABLE 1367#if EV_ASYNC_ENABLE
1358 if (async_pending) 1368 if (async_pending)
1359 { 1369 {
1360 async_pending = 0; 1370 async_pending = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines