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

Comparing libev/ev.c (file contents):
Revision 1.159 by root, Sat Dec 1 19:48:36 2007 UTC vs.
Revision 1.160 by root, Sat Dec 1 22:57:20 2007 UTC

1342 ? EVUNLOOP_ONE 1342 ? EVUNLOOP_ONE
1343 : EVUNLOOP_CANCEL; 1343 : EVUNLOOP_CANCEL;
1344 1344
1345 call_pending (EV_A); /* in case we recurse, ensure ordering stays nice and clean */ 1345 call_pending (EV_A); /* in case we recurse, ensure ordering stays nice and clean */
1346 1346
1347 for (;;) 1347 while (expect_false (!activecnt))
1348 { 1348 {
1349#ifndef _WIN32 1349#ifndef _WIN32
1350 if (expect_false (curpid)) /* penalise the forking check even more */ 1350 if (expect_false (curpid)) /* penalise the forking check even more */
1351 if (expect_false (getpid () != curpid)) 1351 if (expect_false (getpid () != curpid))
1352 { 1352 {
1384 1384
1385 /* calculate blocking time */ 1385 /* calculate blocking time */
1386 { 1386 {
1387 ev_tstamp block; 1387 ev_tstamp block;
1388 1388
1389 if (flags & EVLOOP_NONBLOCK || idlecnt) 1389 if (expect_false (flags & EVLOOP_NONBLOCK || idlecnt || !activecnt))
1390 block = 0.; /* do not block at all */ 1390 block = 0.; /* do not block at all */
1391 else 1391 else
1392 { 1392 {
1393 /* update time to cancel out callback processing overhead */ 1393 /* update time to cancel out callback processing overhead */
1394#if EV_USE_MONOTONIC 1394#if EV_USE_MONOTONIC

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines