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

Comparing libev/ev.c (file contents):
Revision 1.233 by root, Tue May 6 23:34:16 2008 UTC vs.
Revision 1.234 by root, Tue May 6 23:42:16 2008 UTC

1370void 1370void
1371ev_loop_fork (EV_P) 1371ev_loop_fork (EV_P)
1372{ 1372{
1373 postfork = 1; /* must be in line with ev_default_fork */ 1373 postfork = 1; /* must be in line with ev_default_fork */
1374} 1374}
1375
1376#endif 1375#endif
1377 1376
1378#if EV_MULTIPLICITY 1377#if EV_MULTIPLICITY
1379struct ev_loop * 1378struct ev_loop *
1380ev_default_loop_init (unsigned int flags) 1379ev_default_loop_init (unsigned int flags)
1460 p->w->pending = 0; 1459 p->w->pending = 0;
1461 EV_CB_INVOKE (p->w, p->events); 1460 EV_CB_INVOKE (p->w, p->events);
1462 } 1461 }
1463 } 1462 }
1464} 1463}
1464
1465#if EV_IDLE_ENABLE
1466void inline_size
1467idle_reify (EV_P)
1468{
1469 if (expect_false (idleall))
1470 {
1471 int pri;
1472
1473 for (pri = NUMPRI; pri--; )
1474 {
1475 if (pendingcnt [pri])
1476 break;
1477
1478 if (idlecnt [pri])
1479 {
1480 queue_events (EV_A_ (W *)idles [pri], idlecnt [pri], EV_IDLE);
1481 break;
1482 }
1483 }
1484 }
1485}
1486#endif
1465 1487
1466void inline_size 1488void inline_size
1467timers_reify (EV_P) 1489timers_reify (EV_P)
1468{ 1490{
1469 while (timercnt && ev_at (timers [1]) <= mn_now) 1491 while (timercnt && ev_at (timers [1]) <= mn_now)
1541 for (i = periodiccnt >> 1; i--; ) 1563 for (i = periodiccnt >> 1; i--; )
1542 downheap (periodics, periodiccnt, i); 1564 downheap (periodics, periodiccnt, i);
1543} 1565}
1544#endif 1566#endif
1545 1567
1546#if EV_IDLE_ENABLE
1547void inline_size
1548idle_reify (EV_P)
1549{
1550 if (expect_false (idleall))
1551 {
1552 int pri;
1553
1554 for (pri = NUMPRI; pri--; )
1555 {
1556 if (pendingcnt [pri])
1557 break;
1558
1559 if (idlecnt [pri])
1560 {
1561 queue_events (EV_A_ (W *)idles [pri], idlecnt [pri], EV_IDLE);
1562 break;
1563 }
1564 }
1565 }
1566}
1567#endif
1568
1569void inline_speed 1568void inline_speed
1570time_update (EV_P_ ev_tstamp max_block) 1569time_update (EV_P_ ev_tstamp max_block)
1571{ 1570{
1572 int i; 1571 int i;
1573 1572
1599 */ 1598 */
1600 for (i = 4; --i; ) 1599 for (i = 4; --i; )
1601 { 1600 {
1602 rtmn_diff = ev_rt_now - mn_now; 1601 rtmn_diff = ev_rt_now - mn_now;
1603 1602
1604 if (fabs (odiff - rtmn_diff) < MIN_TIMEJUMP) 1603 if (expect_true (fabs (odiff - rtmn_diff) < MIN_TIMEJUMP))
1605 return; /* all is well */ 1604 return; /* all is well */
1606 1605
1607 ev_rt_now = ev_time (); 1606 ev_rt_now = ev_time ();
1608 mn_now = get_clock (); 1607 mn_now = get_clock ();
1609 now_floor = mn_now; 1608 now_floor = mn_now;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines