ioloop.c revision 9f5c9ecc83c451f32c186d53da238996aa4d66fb
/* Copyright (c) 2002-2003 Timo Sirainen */
#include "lib.h"
#include "ioloop-internal.h"
time_t ioloop_time = 0;
struct timeval ioloop_timeval;
struct timezone ioloop_timezone;
{
int max_highest_fd;
break;
}
}
}
{
if ((condition & IO_NOTIFY_MASK) != 0) {
}
/* have to append it, or io_destroy() breaks */
return io;
}
{
return;
}
/* notify the real I/O handler */
/* check if we removed the highest fd */
}
{
/* remove from list */
}
{
struct timeout **t;
break;
}
*t = timeout;
}
{
i_fatal("gettimeofday(): %m");
} else {
}
/* we don't want microsecond accuracy or this function will be
called all the time - millisecond is more than enough */
}
}
void *context)
{
NULL : &ioloop_timeval);
return timeout;
}
{
}
{
}
{
/* no timeouts. give it INT_MAX msecs. */
return INT_MAX;
}
i_fatal("gettimeofday(): %m");
} else {
}
}
/* no need to calculate the times again with this timeout */
return 0;
}
{
unsigned int t_id;
i_fatal("gettimeofday(): %m");
return;
if (t->destroyed) {
continue;
}
if (!t->run_now) {
if (!t->run_now)
break;
}
i_panic("Leaked a t_pop() call!");
}
}
{
}
{
}
{
}
{
}
{
/* initialize time */
i_fatal("gettimeofday(): %m");
return ioloop;
}
{
i_warning("I/O leak: %p (%d)",
}
}
}
}
/* ->prev won't work unless loops are destroyed in create order */
}