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

Comparing libev/ev.c (file contents):
Revision 1.427 by root, Sun May 6 19:29:59 2012 UTC vs.
Revision 1.429 by root, Tue May 8 15:50:49 2012 UTC

202# include <unistd.h> 202# include <unistd.h>
203#else 203#else
204# include <io.h> 204# include <io.h>
205# define WIN32_LEAN_AND_MEAN 205# define WIN32_LEAN_AND_MEAN
206# include <windows.h> 206# include <windows.h>
207# include <winsock2.h>
207# ifndef EV_SELECT_IS_WINSOCKET 208# ifndef EV_SELECT_IS_WINSOCKET
208# define EV_SELECT_IS_WINSOCKET 1 209# define EV_SELECT_IS_WINSOCKET 1
209# endif 210# endif
210# undef EV_AVOID_STDIO 211# undef EV_AVOID_STDIO
211#endif 212#endif
2562#if EV_FEATURE_API 2563#if EV_FEATURE_API
2563void ecb_cold 2564void ecb_cold
2564ev_verify (EV_P) EV_THROW 2565ev_verify (EV_P) EV_THROW
2565{ 2566{
2566#if EV_VERIFY 2567#if EV_VERIFY
2567 int i, j; 2568 int i;
2568 WL w, w2; 2569 WL w, w2;
2569 2570
2570 assert (activecnt >= -1); 2571 assert (activecnt >= -1);
2571 2572
2572 assert (fdchangemax >= fdchangecnt); 2573 assert (fdchangemax >= fdchangecnt);
2573 for (i = 0; i < fdchangecnt; ++i) 2574 for (i = 0; i < fdchangecnt; ++i)
2574 assert (("libev: negative fd in fdchanges", fdchanges [i] >= 0)); 2575 assert (("libev: negative fd in fdchanges", fdchanges [i] >= 0));
2575 2576
2576 assert (anfdmax >= 0); 2577 assert (anfdmax >= 0);
2577 for (i = j = 0; i < anfdmax; ++i) 2578 for (i = 0; i < anfdmax; ++i)
2579 {
2580 int j = 0;
2581
2578 for (w = w2 = anfds [i].head; w; w = w->next) 2582 for (w = w2 = anfds [i].head; w; w = w->next)
2579 { 2583 {
2580 verify_watcher (EV_A_ (W)w); 2584 verify_watcher (EV_A_ (W)w);
2581 2585
2582 if (++j & 1) 2586 if (j++ & 1)
2583 w2 = w2->next; 2587 {
2584
2585 assert (("libev: io watcher list contains a loop", w != w2)); 2588 assert (("libev: io watcher list contains a loop", w != w2));
2589 w2 = w2->next;
2590 }
2591
2586 assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1)); 2592 assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1));
2587 assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i)); 2593 assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i));
2588 } 2594 }
2595 }
2589 2596
2590 assert (timermax >= timercnt); 2597 assert (timermax >= timercnt);
2591 verify_heap (EV_A_ timers, timercnt); 2598 verify_heap (EV_A_ timers, timercnt);
2592 2599
2593#if EV_PERIODIC_ENABLE 2600#if EV_PERIODIC_ENABLE

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines