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

Comparing libev/ev.c (file contents):
Revision 1.256 by root, Thu Jun 19 06:53:49 2008 UTC vs.
Revision 1.260 by root, Mon Sep 8 17:24:39 2008 UTC

565 struct timeval tv; 565 struct timeval tv;
566 566
567 tv.tv_sec = (time_t)delay; 567 tv.tv_sec = (time_t)delay;
568 tv.tv_usec = (long)((delay - (ev_tstamp)(tv.tv_sec)) * 1e6); 568 tv.tv_usec = (long)((delay - (ev_tstamp)(tv.tv_sec)) * 1e6);
569 569
570 /* here we rely on sys/time.h + sys/types.h + unistd.h providing select */
571 /* somehting nto guaranteed by newer posix versions, but guaranteed */
572 /* by older ones */
570 select (0, 0, 0, 0, &tv); 573 select (0, 0, 0, 0, &tv);
571#endif 574#endif
572 } 575 }
573} 576}
574 577
1508{ 1511{
1509 postfork = 1; /* must be in line with ev_default_fork */ 1512 postfork = 1; /* must be in line with ev_default_fork */
1510} 1513}
1511 1514
1512#if EV_VERIFY 1515#if EV_VERIFY
1513void noinline 1516static void noinline
1514verify_watcher (EV_P_ W w) 1517verify_watcher (EV_P_ W w)
1515{ 1518{
1516 assert (("watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI)); 1519 assert (("watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI));
1517 1520
1518 if (w->pending) 1521 if (w->pending)
1904 1907
1905void 1908void
1906ev_unref (EV_P) 1909ev_unref (EV_P)
1907{ 1910{
1908 --activecnt; 1911 --activecnt;
1912}
1913
1914void
1915ev_now_update (EV_P)
1916{
1917 time_update (EV_A_ 1e100);
1909} 1918}
1910 1919
1911static int loop_done; 1920static int loop_done;
1912 1921
1913void 1922void
2979once_cb (EV_P_ struct ev_once *once, int revents) 2988once_cb (EV_P_ struct ev_once *once, int revents)
2980{ 2989{
2981 void (*cb)(int revents, void *arg) = once->cb; 2990 void (*cb)(int revents, void *arg) = once->cb;
2982 void *arg = once->arg; 2991 void *arg = once->arg;
2983 2992
2984 ev_io_stop (EV_A_ &once->io); 2993 ev_io_stop (EV_A_ &once->io);
2985 ev_timer_stop (EV_A_ &once->to); 2994 ev_timer_stop (EV_A_ &once->to);
2986 ev_free (once); 2995 ev_free (once);
2987 2996
2988 cb (revents, arg); 2997 cb (revents, arg);
2989} 2998}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines