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

Comparing libev/ev.c (file contents):
Revision 1.339 by root, Tue Mar 16 00:43:22 2010 UTC vs.
Revision 1.341 by root, Tue Mar 16 20:48:29 2010 UTC

435 435
436 436
437/**/ 437/**/
438 438
439#if EV_VERIFY >= 3 439#if EV_VERIFY >= 3
440# define EV_FREQUENT_CHECK ev_loop_verify (EV_A) 440# define EV_FREQUENT_CHECK ev_verify (EV_A)
441#else 441#else
442# define EV_FREQUENT_CHECK do { } while (0) 442# define EV_FREQUENT_CHECK do { } while (0)
443#endif 443#endif
444 444
445/* 445/*
1531 return backend; 1531 return backend;
1532} 1532}
1533 1533
1534#if EV_FEATURE_API 1534#if EV_FEATURE_API
1535unsigned int 1535unsigned int
1536ev_loop_count (EV_P) 1536ev_iteration (EV_P)
1537{ 1537{
1538 return loop_count; 1538 return loop_count;
1539} 1539}
1540 1540
1541unsigned int 1541unsigned int
1542ev_loop_depth (EV_P) 1542ev_depth (EV_P)
1543{ 1543{
1544 return loop_depth; 1544 return loop_depth;
1545} 1545}
1546 1546
1547void 1547void
1868} 1868}
1869#endif 1869#endif
1870 1870
1871#if EV_FEATURE_API 1871#if EV_FEATURE_API
1872void 1872void
1873ev_loop_verify (EV_P) 1873ev_verify (EV_P)
1874{ 1874{
1875#if EV_VERIFY 1875#if EV_VERIFY
1876 int i; 1876 int i;
1877 WL w; 1877 WL w;
1878 1878
2096 EV_FREQUENT_CHECK; 2096 EV_FREQUENT_CHECK;
2097 feed_reverse (EV_A_ (W)w); 2097 feed_reverse (EV_A_ (W)w);
2098 } 2098 }
2099 while (timercnt && ANHE_at (timers [HEAP0]) < mn_now); 2099 while (timercnt && ANHE_at (timers [HEAP0]) < mn_now);
2100 2100
2101 feed_reverse_done (EV_A_ EV_TIMEOUT); 2101 feed_reverse_done (EV_A_ EV_TIMER);
2102 } 2102 }
2103} 2103}
2104 2104
2105#if EV_PERIODIC_ENABLE 2105#if EV_PERIODIC_ENABLE
2106/* make periodics pending */ 2106/* make periodics pending */
2280 EV_INVOKE_PENDING; /* in case we recurse, ensure ordering stays nice and clean */ 2280 EV_INVOKE_PENDING; /* in case we recurse, ensure ordering stays nice and clean */
2281 2281
2282 do 2282 do
2283 { 2283 {
2284#if EV_VERIFY >= 2 2284#if EV_VERIFY >= 2
2285 ev_loop_verify (EV_A); 2285 ev_verify (EV_A);
2286#endif 2286#endif
2287 2287
2288#ifndef _WIN32 2288#ifndef _WIN32
2289 if (expect_false (curpid)) /* penalise the forking check even more */ 2289 if (expect_false (curpid)) /* penalise the forking check even more */
2290 if (expect_false (getpid () != curpid)) 2290 if (expect_false (getpid () != curpid))
3636{ 3636{
3637 struct ev_once *once = (struct ev_once *)ev_malloc (sizeof (struct ev_once)); 3637 struct ev_once *once = (struct ev_once *)ev_malloc (sizeof (struct ev_once));
3638 3638
3639 if (expect_false (!once)) 3639 if (expect_false (!once))
3640 { 3640 {
3641 cb (EV_ERROR | EV_READ | EV_WRITE | EV_TIMEOUT, arg); 3641 cb (EV_ERROR | EV_READ | EV_WRITE | EV_TIMER, arg);
3642 return; 3642 return;
3643 } 3643 }
3644 3644
3645 once->cb = cb; 3645 once->cb = cb;
3646 once->arg = arg; 3646 once->arg = arg;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines