[dovecot-cvs] dovecot/src/lib ioloop.c,1.12,1.13
cras at procontrol.fi
cras at procontrol.fi
Fri Feb 14 12:45:37 EET 2003
Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv32246/lib
Modified Files:
ioloop.c
Log Message:
Don't inline timeout_update_next(). gcc 3.2.2 with -O2 seems to break it.
Index: ioloop.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ioloop.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ioloop.c 27 Jan 2003 01:44:34 -0000 1.12
+++ ioloop.c 14 Feb 2003 10:45:34 -0000 1.13
@@ -160,8 +160,7 @@
*t = timeout;
}
-inline static void
-timeout_update_next(struct timeout *timeout, struct timeval *tv_now)
+static void timeout_update_next(struct timeout *timeout, struct timeval *tv_now)
{
if (tv_now == NULL)
gettimeofday(&timeout->next_run, NULL);
@@ -172,8 +171,7 @@
/* we don't want microsecond accuracy or this function will be
called all the time - millisecond is more than enough */
- timeout->next_run.tv_usec /= 1000;
- timeout->next_run.tv_usec *= 1000;
+ timeout->next_run.tv_usec -= timeout->next_run.tv_usec % 1000;
timeout->next_run.tv_sec += timeout->msecs/1000;
timeout->next_run.tv_usec += (timeout->msecs%1000)*1000;
More information about the dovecot-cvs
mailing list