ioloop.c revision 6246b93fb37890dcb2f4df9896438f3f376ab284
/* 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;
{
/* have to append it, or io_destroy() breaks */
return io;
}
void *context)
{
return io;
}
{
return;
}
/* notify the real I/O handler */
else
}
{
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 in timeout handler %p",
(void *)t->callback);
}
}
}
{
}
{
}
{
}
{
}
{
/* initialize time */
i_fatal("gettimeofday(): %m");
return ioloop;
}
{
}
}
}
/* ->prev won't work unless loops are destroyed in create order */
}