--- libev/ev.c 2007/11/28 17:50:13 1.156 +++ libev/ev.c 2007/11/28 20:58:32 1.157 @@ -591,7 +591,6 @@ { int fd; - /* this should be highly optimised to not do anything but set a flag */ for (fd = 0; fd < anfdmax; ++fd) if (anfds [fd].events) { @@ -1272,10 +1271,10 @@ /* loop a few times, before making important decisions. * on the choice of "4": one iteration isn't enough, * in case we get preempted during the calls to - * ev_time and get_clock. a second call is almost guarenteed + * ev_time and get_clock. a second call is almost guaranteed * to succeed in that case, though. and looping a few more times * doesn't hurt either as we only do this on time-jumps or - * in the unlikely event of getting preempted here. + * in the unlikely event of having been preempted here. */ for (i = 4; --i; ) { @@ -1307,7 +1306,7 @@ periodics_reschedule (EV_A); #endif - /* adjust timers. this is easy, as the offset is the same for all */ + /* adjust timers. this is easy, as the offset is the same for all of them */ for (i = 0; i < timercnt; ++i) ((WT)timers [i])->at += ev_rt_now - mn_now; } @@ -1339,15 +1338,15 @@ while (activecnt) { - /* we might have forked, so reify kernel state if necessary */ - #if EV_FORK_ENABLE - if (expect_false (postfork)) - if (forkcnt) - { - queue_events (EV_A_ (W *)forks, forkcnt, EV_FORK); - call_pending (EV_A); - } - #endif +#if EV_FORK_ENABLE + /* we might have forked, so queue fork handlers */ + if (expect_false (postfork)) + if (forkcnt) + { + queue_events (EV_A_ (W *)forks, forkcnt, EV_FORK); + call_pending (EV_A); + } +#endif /* queue check watchers (and execute them) */ if (expect_false (preparecnt)) @@ -1365,7 +1364,7 @@ /* calculate blocking time */ { - double block; + ev_tstamp block; if (flags & EVLOOP_NONBLOCK || idlecnt) block = 0.; /* do not block at all */ @@ -1720,7 +1719,7 @@ #define DEF_STAT_INTERVAL 5.0074891 #define MIN_STAT_INTERVAL 0.1074891 -void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents); +static void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents); #if EV_USE_INOTIFY # define EV_INOTIFY_BUFSIZE 8192 @@ -1881,7 +1880,7 @@ w->attr.st_nlink = 1; } -void noinline +static void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents) { ev_stat *w = (ev_stat *)(((char *)w_) - offsetof (ev_stat, timer));