--------------------- PatchSet 291 Date: 2002/12/09 16:06:25 Author: venturaville Branch: epoll Tag: (none) Log: Initial addition of working epoll commloops support. Currently missing support for deferred reads and delay pools Members: configure.in:1.14->1.14.2.1 src/Makefile.am:1.10->1.10.6.1 Index: squid3/configure.in =================================================================== RCS file: /cvsroot/squid-sf//squid3/configure.in,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -u -r1.14 -r1.14.2.1 --- squid3/configure.in 6 Dec 2002 23:58:59 -0000 1.14 +++ squid3/configure.in 9 Dec 2002 16:06:25 -0000 1.14.2.1 @@ -3,7 +3,7 @@ dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.14 2002/12/06 23:58:59 squidadm Exp $ +dnl $Id: configure.in,v 1.14.2.1 2002/12/09 16:06:25 venturaville Exp $ dnl dnl dnl @@ -13,7 +13,7 @@ AC_CONFIG_AUX_DIR(cfgaux) AM_INIT_AUTOMAKE(squid, 3.0-DEVEL) AM_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.14 $)dnl +AC_REVISION($Revision: 1.14.2.1 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -743,6 +743,28 @@ esac ]) +dnl Enable epoll() +AC_ARG_ENABLE(epoll, +[ --enable-epoll Enable epoll() support. + --disable-epoll Disable epoll() support. ], + +[ + case "$enableval" in + yes) + echo "Forcing epoll() to be enabled" + ac_cv_func_epoll='yes' + if test -z "$EPOLL_LIBS"; then + EPOLL_LIBS="-lepoll" + fi + AC_SUBST(EPOLL_LIBS) + ;; + no) + echo "Forcing epoll() to be disabled" + ac_cv_func_epoll='no' + ;; +esac +]) + dnl Disable HTTP violations http_violations=1 AC_ARG_ENABLE(http-violations, @@ -1802,8 +1824,11 @@ elif test "$ac_cv_func_kqueue" = "yes" ; then SELECT_TYPE="kqueue" AC_DEFINE(USE_KQUEUE,1,[Use kqueue() for the IO loop]) +elif test "$ac_cv_func_epoll" = "yes" ; then + SELECT_TYPE="epoll" + AC_DEFINE(USE_EPOLL,1,[Use epoll() for the IO loop]) else - echo "Eep! Can't find poll, kqueue or select!" + echo "Eep! Can't find poll, kqueue, epoll, or select!" echo "I'll try select and hope for the best." SELECT_TYPE="select" AC_DEFINE(USE_SELECT,1) Index: squid3/src/Makefile.am =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Makefile.am,v retrieving revision 1.10 retrieving revision 1.10.6.1 diff -u -r1.10 -r1.10.6.1 --- squid3/src/Makefile.am 23 Nov 2002 03:12:57 -0000 1.10 +++ squid3/src/Makefile.am 9 Dec 2002 16:06:25 -0000 1.10.6.1 @@ -1,11 +1,17 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.10 2002/11/23 03:12:57 squidadm Exp $ +# $Id: Makefile.am,v 1.10.6.1 2002/12/09 16:06:25 venturaville Exp $ # # Uncomment and customize the following to suit your needs: # +if USE_EPOLL +EPOLL_LIBS = -lepoll +else +EPOLL_LIBS = +endif + if USE_DNSSERVER DNSSOURCE = dns.cc DNSSERVER = dnsserver @@ -140,6 +146,7 @@ comm_select.cc \ comm_poll.cc \ comm_kqueue.cc \ + comm_epoll.cc \ debug.cc \ defines.h \ $(DELAY_POOL_SOURCE) \