timer in libinn

Russ Allbery rra at stanford.edu
Tue Feb 6 19:57:10 UTC 2001


Alex Kiernan <alexk at demon.net> writes:

> Code to move timers into libinn, this seems to be doing the right thing;
> lib/timer.c and include/timer.h should be attached. This should cover
> both innfeed & innd. Still needs some docs writing, I'll get to that
> today, with luck.

Do we still need these configure changes?  It doesn't look like your patch
actually uses them, and I think gettimeofday should be as fast as
gethrtime and probably more portable.

Using alloca isn't a bad idea, but it requires that we have a fallback
available for those platforms that don't have it, which requires that we
call alloca(0) periodically and which would mean some infrastructure
work.

Thank you very much for your patch!

> Index: configure.in
> ===================================================================
> RCS file: /upstream-repositories/inn-cvs.isc.org/inn/configure.in,v
> retrieving revision 1.195
> diff -u -r1.195 configure.in
> --- configure.in	2001/02/06 01:11:31	1.195
> +++ configure.in	2001/02/06 08:12:52
> @@ -1132,6 +1135,7 @@
>  AC_FUNC_MEMCMP
>  AC_FUNC_VFORK
>  AC_TYPE_SIGNAL
> +AC_FUNC_ALLOCA
 
>  dnl Source used by INN_FUNC_INET_NTOA
>  define([_INN_FUNC_INET_NTOA_SOURCE],
> @@ -1216,7 +1220,7 @@
>  dnl Check for various other functions.
>  AC_CHECK_FUNCS(atexit getpagesize getrlimit getrusage getspnam setbuffer \
>                 sigaction setrlimit setsid socketpair statvfs strncasecmp \
> -               strtoul symlink sysconf)
> +               strtoul symlink sysconf gethrtime)
 
>  dnl Find a way to get the file descriptor limit.
>  if test x"$ac_cv_func_getrlimit" = xno ; then

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>


More information about the inn-patches mailing list