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

Comparing libev/ev.c (file contents):
Revision 1.93 by root, Sun Nov 11 01:07:35 2007 UTC vs.
Revision 1.94 by root, Sun Nov 11 01:29:49 2007 UTC

1434 1434
1435void 1435void
1436ev_idle_stop (EV_P_ struct ev_idle *w) 1436ev_idle_stop (EV_P_ struct ev_idle *w)
1437{ 1437{
1438 ev_clear_pending (EV_A_ (W)w); 1438 ev_clear_pending (EV_A_ (W)w);
1439 if (ev_is_active (w)) 1439 if (!ev_is_active (w))
1440 return; 1440 return;
1441 1441
1442 idles [((W)w)->active - 1] = idles [--idlecnt]; 1442 idles [((W)w)->active - 1] = idles [--idlecnt];
1443 ev_stop (EV_A_ (W)w); 1443 ev_stop (EV_A_ (W)w);
1444} 1444}
1456 1456
1457void 1457void
1458ev_prepare_stop (EV_P_ struct ev_prepare *w) 1458ev_prepare_stop (EV_P_ struct ev_prepare *w)
1459{ 1459{
1460 ev_clear_pending (EV_A_ (W)w); 1460 ev_clear_pending (EV_A_ (W)w);
1461 if (ev_is_active (w)) 1461 if (!ev_is_active (w))
1462 return; 1462 return;
1463 1463
1464 prepares [((W)w)->active - 1] = prepares [--preparecnt]; 1464 prepares [((W)w)->active - 1] = prepares [--preparecnt];
1465 ev_stop (EV_A_ (W)w); 1465 ev_stop (EV_A_ (W)w);
1466} 1466}
1478 1478
1479void 1479void
1480ev_check_stop (EV_P_ struct ev_check *w) 1480ev_check_stop (EV_P_ struct ev_check *w)
1481{ 1481{
1482 ev_clear_pending (EV_A_ (W)w); 1482 ev_clear_pending (EV_A_ (W)w);
1483 if (ev_is_active (w)) 1483 if (!ev_is_active (w))
1484 return; 1484 return;
1485 1485
1486 checks [((W)w)->active - 1] = checks [--checkcnt]; 1486 checks [((W)w)->active - 1] = checks [--checkcnt];
1487 ev_stop (EV_A_ (W)w); 1487 ev_stop (EV_A_ (W)w);
1488} 1488}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines