ioloop.c revision 562d0d9daf4a36c8434a217a02919017fddc1aa4
2ronwalf/* Copyright (c) 2002-2010 Dovecot authors, see the included COPYING file */ 38daenzerorama /* if we got here from an I/O handler callback, make sure we /* make sure the callback doesn't get called anymore. kqueue code relies on this. */ /* we don't want microsecond accuracy or this function will be called all the time - millisecond is more than enough */ /* if we came here from io_loop_handle_timeouts(), next_run must be larger than tv_now or we could go to infinite loop. +1000 to get 1 ms further, another +1000 to account for timeout_update_next()'s truncation. */ /* round wait times up to next millisecond */ /* no timeouts. use INT_MAX msecs for timeval and i_warning(
"Time moved backwards by %ld seconds.",
for (i = 0; i <
count; i++) {
/* Don't bother comparing usecs. */ /* time moved backwards */ /* the callback may have slept, so check the time again. */ /* time moved forwards */ /* use tv_call to make sure we don't get to infinite loop in case callbacks update ioloop_timeval. */ /* update timeout's next_run and reposition it in the queue */ i_panic(
"Leaked a t_pop() call in timeout handler %p",
i_panic(
"Leaked a t_pop() call in I/O handler %p",
/* ->prev won't work unless loops are destroyed in create order */ /* cur_log itself keeps a reference */