… | |
… | |
411 | # undef EV_USE_INOTIFY |
411 | # undef EV_USE_INOTIFY |
412 | # define EV_USE_INOTIFY 0 |
412 | # define EV_USE_INOTIFY 0 |
413 | # endif |
413 | # endif |
414 | #endif |
414 | #endif |
415 | |
415 | |
416 | #if EV_SELECT_IS_WINSOCKET |
|
|
417 | # include <winsock.h> |
|
|
418 | #endif |
|
|
419 | |
|
|
420 | #if EV_USE_EVENTFD |
416 | #if EV_USE_EVENTFD |
421 | /* our minimum requirement is glibc 2.7 which has the stub, but not the header */ |
417 | /* our minimum requirement is glibc 2.7 which has the stub, but not the header */ |
422 | # include <stdint.h> |
418 | # include <stdint.h> |
423 | # ifndef EFD_NONBLOCK |
419 | # ifndef EFD_NONBLOCK |
424 | # define EFD_NONBLOCK O_NONBLOCK |
420 | # define EFD_NONBLOCK O_NONBLOCK |
… | |
… | |
2563 | #if EV_FEATURE_API |
2559 | #if EV_FEATURE_API |
2564 | void ecb_cold |
2560 | void ecb_cold |
2565 | ev_verify (EV_P) EV_THROW |
2561 | ev_verify (EV_P) EV_THROW |
2566 | { |
2562 | { |
2567 | #if EV_VERIFY |
2563 | #if EV_VERIFY |
2568 | int i, j; |
2564 | int i; |
2569 | WL w, w2; |
2565 | WL w, w2; |
2570 | |
2566 | |
2571 | assert (activecnt >= -1); |
2567 | assert (activecnt >= -1); |
2572 | |
2568 | |
2573 | assert (fdchangemax >= fdchangecnt); |
2569 | assert (fdchangemax >= fdchangecnt); |
2574 | for (i = 0; i < fdchangecnt; ++i) |
2570 | for (i = 0; i < fdchangecnt; ++i) |
2575 | assert (("libev: negative fd in fdchanges", fdchanges [i] >= 0)); |
2571 | assert (("libev: negative fd in fdchanges", fdchanges [i] >= 0)); |
2576 | |
2572 | |
2577 | assert (anfdmax >= 0); |
2573 | assert (anfdmax >= 0); |
2578 | for (i = j = 0; i < anfdmax; ++i) |
2574 | for (i = 0; i < anfdmax; ++i) |
|
|
2575 | { |
|
|
2576 | int j = 0; |
|
|
2577 | |
2579 | for (w = w2 = anfds [i].head; w; w = w->next) |
2578 | for (w = w2 = anfds [i].head; w; w = w->next) |
2580 | { |
2579 | { |
2581 | verify_watcher (EV_A_ (W)w); |
2580 | verify_watcher (EV_A_ (W)w); |
2582 | |
2581 | |
2583 | if (j++ & 1) |
2582 | if (j++ & 1) |
2584 | { |
2583 | { |
2585 | assert (("libev: io watcher list contains a loop", w != w2)); |
2584 | assert (("libev: io watcher list contains a loop", w != w2)); |
2586 | w2 = w2->next; |
2585 | w2 = w2->next; |
2587 | } |
2586 | } |
2588 | |
2587 | |
2589 | assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1)); |
2588 | assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1)); |
2590 | assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i)); |
2589 | assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i)); |
2591 | } |
2590 | } |
|
|
2591 | } |
2592 | |
2592 | |
2593 | assert (timermax >= timercnt); |
2593 | assert (timermax >= timercnt); |
2594 | verify_heap (EV_A_ timers, timercnt); |
2594 | verify_heap (EV_A_ timers, timercnt); |
2595 | |
2595 | |
2596 | #if EV_PERIODIC_ENABLE |
2596 | #if EV_PERIODIC_ENABLE |