Hello Amos,

thank you for your response. Please find attached the four files in question.

Companies to mention as sponsors are BBC (UK), Siemens IT Solutions and Services (UK).

Credit to Peter Payne, Pirosa Limited UK (no e-mail please).

Squid bug 3057 was raised by another member of Siemens IT Solutions and Services during testing of Squid 3.1.8 on Solaris - that bug was not produced on the 32-bit compile, just the 64-bit compile. It is not thought this is related to the /dev/poll support added here.

Note that while porting comm_devpoll.cc I have suspicions that the comm_epoll.cc commResetSelect() function does nothing (i.e., it calls commSetSelect with no type flag, which I suspect is a no-op for all intents and purposes). I haven't confirmed this, however, so haven't raised it as a bug. Someone may want to double-check.

Kind regards,
Peter Payne

On 10/09/10 02:26, Amos Jeffries wrote:
On 08/10/10 23:13, Peter Payne wrote:
Dear Mailing List,

I have a contribution to make, a C++ file (and autoconf patches) for
/dev/poll Solaris support, ported from Squid-2 and in use on the BBC
(UK) estate managed by Siemens UK with permission from the BBC to
publish to the Squid open-source project.

I've not contributed to an open source project before and unsure how to
deliver the patch. We (at the BBC/Siemens) would like to see the patch
included so that future releases of Squid shall have the Solaris
/dev/poll support supplied (reducing the need for us to patch each
following release manually).

If one of you were to e-mail me directly I would be happy to provide the
following:
comm_devpoll.cc - /dev/poll support file to add to /src/ subdir
squid-root.diff - unified diff to update configure.in in the / subdir
squid-include.diff - unified diff to update autoconf.h.in in the
/include/ subdir
squid-src.diff - unified diff to update files Makefile.in and unlinkd.cc
in the /src/ subdir

The support for /dev/poll will be automatically detected by configure
and conditionally compiled in.


Greetings Peter,
  Thank you very much for this.

Our procedure for patch inclusion is relatively simple:

 * Post the unified-diff format patches here to the squid-dev list.
 * with a subject starting "[PATCH] "
 * who to credit as author(s), default is the senders name and email.
* message text describing hat it does for the public commit record and to assist people understand the code.
 * companies where relevant mention as thanks or sponsors
(these last two are covered by the email you already sent).

One or more of us will do an audit that it fits on 3.HEAD then reply with any updates that may be needed.

Most of that you have done already, we just need the patches posted with author details to start the audit cycle.


On the administrative side. I'm not sure this one is /dev/poll related, but with the info that BBC is using your patch this reporters address and build options looks a little suspicious:
http://bugs.squid-cache.org/show_bug.cgi?id=3057
If you can sight it without the patch or can't sight it at all thats fine, but if introduced it will need fixing.


Amos Jeffries
Squid HTTP Proxy Project


/*
 * $Id$
 *
 * DEBUG: section 05    Socket Functions
 *
 * SQUID Web Proxy Cache          http://www.squid-cache.org/
 * ----------------------------------------------------------
 *
 *  Squid is the result of efforts by numerous individuals from
 *  the Internet community; see the CONTRIBUTORS file for full
 *  details.   Many organizations have provided support for Squid's
 *  development; see the SPONSORS file for full details.  Squid is
 *  Copyrighted (C) 2001 by the Regents of the University of
 *  California; see the COPYRIGHT file for full details.  Squid
 *  incorporates software developed and/or copyrighted by other
 *  sources; see the CREDITS file for full details.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
 *
 */

/*
 * This is a very simple driver for Solaris /dev/poll.
 *
 * The updates are batched, one trip through the comm loop.
 * (like libevent.) We keep a pointer into the structs so we
 * can zero out an entry in the poll list if its active.
 *
 * Ported by Peter Payne from Squid 2.7.STABLE9 comm_devpoll.c
 * on August 11, 2010 at 3pm (GMT+0100 Europe/London).
 *
 * Last modified 2010-10-08
 */


#include "squid.h"
#include "CacheManager.h"
#include "Store.h"
#include "fde.h"
#include "SquidTime.h"

#ifdef USE_DEVPOLL

#if HAVE_SYS_DEVPOLL_H
#include <sys/devpoll.h> /* Solaris /dev/poll support */
#endif

#define DEBUG_DEVPOLL 0

/* OPEN_MAX is defined in <limits.h>, presumably included by sys/devpoll.h */
#define	DEVPOLL_UPDATESIZE	OPEN_MAX
#define	DEVPOLL_QUERYSIZE	OPEN_MAX

/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
/* define structures */

/* Current state */
struct _devpoll_state {
    char state;
    int update_offset;
};

/* The update list */
struct {
    struct pollfd *pfds;
    int cur;
    int size;
} devpoll_update;


/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
/* static variables */

static int devpoll_fd;
static struct timespec zero_timespec;
static int max_poll_time = 1000;

static struct _devpoll_state *devpoll_state;
static struct dvpoll do_poll;
static int dpoll_nfds;

/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
/* prototypes */

static void commDevPollRegisterWithCacheManager(void);


/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
/* private functions */

static void
comm_flush_updates(void)
{
    int i;
    if (devpoll_update.cur == -1)
	return;

    debugs(5, DEBUG_DEVPOLL ? 0 : 8, "comm_flush_updates(): " << (devpoll_update.cur + 1) << " fds queued");

    i = write(devpoll_fd, devpoll_update.pfds, (devpoll_update.cur + 1) * sizeof(struct pollfd));
    assert(i > 0);
    assert(i == sizeof(struct pollfd) * (devpoll_update.cur + 1));
    devpoll_update.cur = -1;
}

/*
 * We could be "optimal" and -change- an existing entry if they
 * just add a bit - since the devpoll interface OR's multiple fd
 * updates. We'll need to POLLREMOVE entries which has a bit cleared
 * but for now I'll do whats "easier" and add the smart logic
 * later.
 */
static void
comm_update_fd(int fd, int events)
{
#if DEBUG_DEVPOLL
    char acDebugStr[ 2048 ];

    acDebugStr[0] = '\0';
    if ( events & POLLIN )
        strlcat( acDebugStr, " IN", sizeof(acDebugStr) );
    if ( events & POLLOUT )
        strlcat( acDebugStr, " OUT", sizeof(acDebugStr) );
    if ( events & POLLREMOVE )
        strlcat( acDebugStr, " REMOVE", sizeof(acDebugStr) );
    if ( events & POLLERR )
        strlcat( acDebugStr, " ERR", sizeof(acDebugStr) );
    if ( events & POLLHUP )
        strlcat( acDebugStr, " HUP", sizeof(acDebugStr) );
    if ( events & POLLNVAL )
        strlcat( acDebugStr, " NVAL", sizeof(acDebugStr) );

    debugs(5, DEBUG_DEVPOLL ? 0 : 8, "comm_update_fd(FD " << fd << ", events=[" << acDebugStr << " ])");
#endif /* DEBUG_DEVPOLL */

    if (devpoll_update.cur != -1 && (devpoll_update.cur == devpoll_update.size))
	comm_flush_updates();
    devpoll_update.cur++;
#if DEBUG_DEVPOLL
    debugs(5, DEBUG_DEVPOLL ? 0 : 8, "comm_update_fd: -> new slot (" << devpoll_update.cur << ")");
#endif /* DEBUG_DEVPOLL */
    devpoll_state[fd].update_offset = devpoll_update.cur;
    devpoll_update.pfds[devpoll_update.cur].fd = fd;
    devpoll_update.pfds[devpoll_update.cur].events = events;
    devpoll_update.pfds[devpoll_update.cur].revents = 0;
}

static void commIncomingStats(StoreEntry *sentry) {
    StatCounters *f = &statCounter;
    storeAppendPrintf(sentry, "Total number of devpoll loops: %ld\n", statCounter.select_loops);
    storeAppendPrintf(sentry, "Histogram of returned filedescriptors\n");
    statHistDump(&f->select_fds_hist, sentry, statHistIntDumper);
}


static void
commDevPollRegisterWithCacheManager(void)
{
    CacheManager::GetInstance()->
    registerAction("comm_devpoll_incoming",
                   "comm_incoming() stats",
                   commIncomingStats, 0, 1);
}

/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
/* public functions */

/*
 * comm_select_init
 *
 * This is a needed exported function which will be called to initialise
 * the network loop code.
 */
void
comm_select_init(void)
{
    /* set up static structure */
    zero_timespec.tv_sec = 0;
    zero_timespec.tv_nsec = 0;

    /* allocate memory first before attempting to open poll device */
    /* This tracks the FD devpoll offset+state */
    devpoll_state = (struct _devpoll_state *)xcalloc(
        SQUID_MAXFD, sizeof(struct _devpoll_state)
    );

    /* And this is the stuff we use to read events */
    do_poll.dp_fds = (struct pollfd *)xcalloc(
        DEVPOLL_QUERYSIZE, sizeof(struct pollfd)
    );
    dpoll_nfds = DEVPOLL_QUERYSIZE;

    devpoll_update.pfds = (struct pollfd *)xcalloc(
        DEVPOLL_UPDATESIZE, sizeof(struct pollfd)
    );
    devpoll_update.cur = -1;
    devpoll_update.size = DEVPOLL_UPDATESIZE;

    /* attempt to open /dev/poll device */
    devpoll_fd = open("/dev/poll", O_RDWR);
    if (devpoll_fd < 0)
	fatalf("comm_select_init: can't open /dev/poll: %s\n", xstrerror());

    fd_open(devpoll_fd, FD_UNKNOWN, "devpoll ctl");

    commDevPollRegisterWithCacheManager();
}

/*
 * comm_setselect
 *
 * This is a needed exported function which will be called to register
 * and deregister interest in a pending IO state for a given FD.
 *
 * If handler=NULL then:
 *   if type=COMM_SELECT_READ then STOP polling for input awaiting processing
 *   if type=COMM_SELECT_WRITE then STOP polling for output buffer ready
 * If handler != NULL then:
 *   if type=COMM_SELECT_READ then START polling for input awaiting processing
 *   if type=COMM_SELECT_WRITE then START polling for output buffer ready
 *
 */
void
commSetSelect(int fd, unsigned int type, PF * handler,
              void *client_data, time_t timeout)
{
    assert(fd >= 0);
    debugs(5, DEBUG_DEVPOLL ? 0 : 8, "commSetSelect(FD " << fd << ",type=" << type <<
           ",handler=" << handler << ",client_data=" << client_data <<
           ",timeout=" << timeout << ")");

    /* POLLIN/POLLOUT are defined in <sys/poll.h> */
    fde *F = &fd_table[fd];
    if (!F->flags.open) {
        /* remove from poll set */
        comm_update_fd( fd, POLLREMOVE );
        devpoll_state[fd].state = 0;
        return;
    }

    int st_new = 0; /* new state (derive from old state and function args) */

    if ( type & COMM_SELECT_READ ) {
        if ( handler != NULL ) {
            /* we want to POLLIN */
            st_new |= POLLIN;
        } else {
            ; /* we want to clear POLLIN because handler is NULL */
        }

        F->read_handler = handler;
        F->read_data = client_data;
    } else if ( devpoll_state[fd].state & POLLIN ) {
        /* we're not changing reading state so take from existing */
        st_new |= POLLIN;
    }

    if ( type & COMM_SELECT_WRITE ) {
        if ( handler != NULL ) {
            /* we want to POLLOUT */
            st_new |= POLLOUT;
        } else {
            ; /* we want to clear POLLOUT because handler is NULL */
        }

        F->write_handler = handler;
        F->write_data = client_data;
    } else if ( devpoll_state[fd].state & POLLOUT ) {
        /* we're not changing writing state so take from existing */
        st_new |= POLLOUT;
    }

    if ( devpoll_state[fd].state ^ st_new ) {
        /* something has changed, update /dev/poll of what to listen for */
        comm_update_fd( fd, POLLREMOVE );
        if ( st_new )
            comm_update_fd( fd, st_new );
        devpoll_state[fd].state = st_new;
    }

    if (timeout)
        F->timeout = squid_curtime + timeout;
}


void
commResetSelect(int fd)
{
    commSetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0);
    commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
}


/*
 * comm_select
 * Check all connections for new connections and input data that is to be
 * processed. Also check for connections with data queued and whether we can
 * write it out.
 *
 * Called to do the new-style IO, courtesy of of squid (like most of this
 * new IO code). This routine handles the stuff we've hidden in
 * comm_setselect and fd_table[] and calls callbacks for IO ready
 * events.
 */

comm_err_t
comm_select(int msec)
{
    int num, i;
    fde *F;
    PF *hdl;

    PROF_start(comm_check_incoming);

    if (msec > max_poll_time)
        msec = max_poll_time;

    for (;;) {
        do_poll.dp_timeout = msec;
        do_poll.dp_nfds = dpoll_nfds;

        comm_flush_updates();

        num = ioctl(devpoll_fd, DP_POLL, &do_poll);
        ++statCounter.select_loops;

        if (num >= 0)
            break;

        if (ignoreErrno(errno))
            break;

        getCurrentTime();

        PROF_stop(comm_check_incoming);

        return COMM_ERROR;
    }

    PROF_stop(comm_check_incoming);
    getCurrentTime();

    statHistCount(&statCounter.select_fds_hist, num);

    if (num == 0)
        return COMM_TIMEOUT; /* No error.. */

    PROF_start(comm_handle_ready_fd);

    for (i = 0; i < num; i++) {
	int fd = (int)do_poll.dp_fds[i].fd;
        F = &fd_table[fd];
        debugs(5, DEBUG_DEVPOLL ? 0 : 8, "comm_select(): got FD " << fd << " events=" <<
               std::hex << do_poll.dp_fds[i].revents << " monitoring=" << devpoll_state[fd].state <<
               " F->read_handler=" << F->read_handler << " F->write_handler=" << F->write_handler);

        /* handle errors */
	if (do_poll.dp_fds[i].revents & (POLLERR | POLLHUP | POLLNVAL)) {
	    debugs(5, DEBUG_DEVPOLL ? 0 : 8, "comm_select(): devpoll event error: fd " << fd);
	    continue; /* XXX! */
	}

	if (do_poll.dp_fds[i].revents & POLLIN || F->flags.read_pending) {
            if ( (hdl = F->read_handler) != NULL ) {
                debugs(5, DEBUG_DEVPOLL ? 0 : 8, "comm_select(): Calling read handler on FD " << fd);
                PROF_start(comm_read_handler);
                F->flags.read_pending = 0;
                F->read_handler = NULL;
                hdl(fd, F->read_data);
                PROF_stop(comm_read_handler);
                statCounter.select_fds++;
            } else {
                debugs(5, DEBUG_DEVPOLL ? 0 : 8, "comm_select(): no read handler for FD " << fd);
                // remove interest since no handler exist for this event.
                commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
            }
        }

	if (do_poll.dp_fds[i].revents & POLLOUT) {
            if ((hdl = F->write_handler) != NULL) {
                debugs(5, DEBUG_DEVPOLL ? 0 : 8, "comm_select(): Calling write handler on FD " << fd);
                PROF_start(comm_write_handler);
                F->write_handler = NULL;
                hdl(fd, F->write_data);
                PROF_stop(comm_write_handler);
                statCounter.select_fds++;
            } else {
                debugs(5, DEBUG_DEVPOLL ? 0 : 8, "comm_select(): no write handler for FD " << fd);
                // remove interest since no handler exist for this event.
                commSetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0);
            }
        }
    }

    PROF_stop(comm_handle_ready_fd);

    return COMM_OK;
}

void
comm_quick_poll_required(void)
{
    max_poll_time = 10;
}

#endif /* USE_DEVPOLL */
Only in .: .deps
Only in .: Makefile
diff -u ../../squid-3.1.8/compat/compat_shared.h ./compat_shared.h
--- ../../squid-3.1.8/compat/compat_shared.h	Sat Sep  4 04:25:58 2010
+++ ./compat_shared.h	Mon Oct 11 11:50:20 2010
@@ -64,7 +64,7 @@
 /* Limited by design */
 # define SQUID_MAXFD_LIMIT    ((signed int)FD_SETSIZE)
 
-#elif defined(USE_POLL)
+#elif defined(USE_POLL) || defined(USE_DEVPOLL)
 /* Limited due to delay pools */
 # define SQUID_MAXFD_LIMIT    ((signed int)FD_SETSIZE)
 
Common subdirectories: ../../squid-3.1.8/compat/os and ./os
Only in .: autoconf.h
diff -u ../../squid-3.1.8/include/autoconf.h.in ./autoconf.h.in
--- ../../squid-3.1.8/include/autoconf.h.in	Sat Sep  4 04:26:15 2010
+++ ./autoconf.h.in	Mon Oct 11 11:38:52 2010
@@ -772,6 +772,9 @@
 /* Define to 1 if you have the <sys/epoll.h> header file. */
 #undef HAVE_SYS_EPOLL_H
 
+/* Define to 1 if you have the <sys/devpoll.h> header file. */
+#undef HAVE_SYS_DEVPOLL_H
+
 /* Define to 1 if you have the <sys/event.h> header file. */
 #undef HAVE_SYS_EVENT_H
 
@@ -1136,6 +1139,9 @@
 /* Use epoll() for the IO loop */
 #undef USE_EPOLL
 
+/* Use /dev/poll for the IO loop */
+#undef USE_DEVPOLL
+
 /* Use multi-language support on error pages */
 #undef USE_ERR_LOCALES
 
Only in .: autoconf.h.in.orig
Only in .: stamp-h1
--- ../squid-3.1.8/configure.in	Sat Sep  4 04:26:52 2010
+++ ./configure.in	Mon Oct 11 11:38:39 2010
@@ -1339,6 +1339,59 @@
   fi
 fi
 
+dnl Enable solaris /dev/poll
+disable_devpoll=
+force_devpoll="no"
+AC_ARG_ENABLE(devpoll,
+  AS_HELP_STRING([--disable-devpoll],[Disable Solaris /dev/poll support.]),
+[
+  case "$enableval" in
+  yes)
+    AC_MSG_WARN([Forcing devpoll() to be enabled])
+    SELECT_TYPE="devpoll"
+    force_devpoll="yes"
+    ;;
+  no)
+    AC_MSG_WARN([Forcing devpoll() to be disabled])
+    disable_devpoll=true
+  ;;
+esac
+])
+dnl auto-detect and verify devpoll header and library present and working
+if test -z "$disable_devpoll"; then
+
+  # Check for /dev/poll
+  AC_CHECK_FUNCS(ioctl)
+  AC_CHECK_FUNCS(write)
+
+  dnl devpoll requires sys/devpoll.h
+  AC_CHECK_HEADERS([sys/devpoll.h])
+
+  dnl Verify that /dev/poll really works
+  if test "$ac_cv_func_ioctl" = "yes" && test "$ac_cv_func_write" = "yes"; then
+    AC_CACHE_CHECK(if /dev/poll works, ac_cv_devpoll_works,
+      AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <sys/devpoll.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+    int fd = open("/dev/poll", O_RDWR);
+    if (fd < 0) {
+	perror("devpoll_create:");
+	return 1;
+    }
+    return 0;
+}
+      ]])],[ac_cv_devpoll_works=yes],[ac_cv_devpoll_works=no],[]))
+  fi
+
+  if test "$force_devpoll" = "yes" && test "$ac_cv_devpoll_works" = "no" ; then
+    AC_MSG_ERROR([/dev/poll does not work. Force-enabling it is not going to help.])
+  fi
+fi
+
 dnl Disable HTTP violations
 http_violations=1
 AC_ARG_ENABLE(http-violations,
@@ -3013,6 +3066,8 @@
 	: # Already decided above. Nothing to do here
 elif test -z "$disable_epoll" && test "$ac_cv_epoll_works" = "yes" ; then
 	SELECT_TYPE="epoll"
+elif test -z "$disable_devpoll" && test "$ac_cv_devpoll_works" = "yes" ; then
+	SELECT_TYPE="devpoll"
 elif test -z "$disable_kqueue" && test "$ac_cv_func_kqueue" = "yes" ; then
 	SELECT_TYPE="kqueue"
 elif test -z "$disable_poll" && test "$ac_cv_func_poll" = "yes" ; then
@@ -3027,7 +3082,7 @@
 		;;
 	esac
 else
-        AC_MSG_WARN([Eep!  Can't find poll, kqueue, epoll, or select!])
+        AC_MSG_WARN([Eep!  Can't find poll, devpoll, kqueue, epoll, or select!])
         AC_MSG_WARN([I'll try select and hope for the best.])
         SELECT_TYPE="select"
         AC_DEFINE(USE_SELECT,1)
@@ -3037,6 +3092,7 @@
 
 AM_CONDITIONAL([USE_POLL], [test $SELECT_TYPE = poll])
 AM_CONDITIONAL([USE_EPOLL], [test $SELECT_TYPE = epoll])
+AM_CONDITIONAL([USE_DEVPOLL], [test $SELECT_TYPE = devpoll])
 AM_CONDITIONAL([USE_SELECT], [test $SELECT_TYPE = select])
 AM_CONDITIONAL([USE_SELECT_SIMPLE], [test $SELECT_TYPE = select_simple])
 AM_CONDITIONAL([USE_SELECT_WIN32], [test $SELECT_TYPE = select_win32])
@@ -3047,6 +3103,9 @@
 epoll)
 	AC_DEFINE(USE_EPOLL,1,[Use epoll() for the IO loop])
 	;;
+devpoll)
+	AC_DEFINE(USE_DEVPOLL,1,[Use /dev/poll for the IO loop])
+	;;
 poll)
         AC_DEFINE(USE_POLL,1,[Use poll() for the IO loop])
 	;;
Only in .: .deps
Common subdirectories: ../../squid-3.1.8/src/DiskIO and ./DiskIO
Only in .: Makefile
diff -u ../../squid-3.1.8/src/Makefile.in ./Makefile.in
--- ../../squid-3.1.8/src/Makefile.in	Sat Sep  4 04:26:26 2010
+++ ./Makefile.in	Mon Oct 11 11:39:08 2010
@@ -174,7 +174,8 @@
 	ClientRequestContext.h clientStream.cc clientStream.h CommIO.h \
 	CompletionDispatcher.cc CompletionDispatcher.h comm_select.cc \
 	comm_select.h comm_select_win32.cc comm_poll.cc comm_poll.h \
-	comm_epoll.cc comm_epoll.h comm_kqueue.cc comm_kqueue.h \
+	comm_epoll.cc comm_epoll.h comm_devpoll.cc \
+	comm_kqueue.cc comm_kqueue.h \
 	CommRead.h ConfigOption.cc ConfigParser.cc ConfigParser.h \
 	ConnectionDetail.h debug.cc Debug.h defines.h CommonPool.h \
 	CompositePoolNode.h delay_pools.cc DelayId.cc DelayId.h \
@@ -230,7 +231,8 @@
 	LoadableModule.cc LoadableModules.h LoadableModules.cc
 am__objects_4 = AclRegs.$(OBJEXT) AuthReg.$(OBJEXT)
 am__objects_5 = comm_select.$(OBJEXT) comm_select_win32.$(OBJEXT) \
-	comm_poll.$(OBJEXT) comm_epoll.$(OBJEXT) comm_kqueue.$(OBJEXT)
+	comm_poll.$(OBJEXT) comm_epoll.$(OBJEXT) comm_devpoll.$(OBJEXT) \
+	comm_kqueue.$(OBJEXT)
 am__objects_6 = delay_pools.$(OBJEXT) DelayId.$(OBJEXT) \
 	DelayBucket.$(OBJEXT) DelayConfig.$(OBJEXT) \
 	DelayPool.$(OBJEXT) DelaySpec.$(OBJEXT) DelayTagged.$(OBJEXT) \
@@ -397,7 +399,8 @@
 	client_db.cc client_side.cc client_side_reply.cc \
 	client_side_request.cc ClientInfo.h clientStream.cc \
 	comm_select.cc comm_select.h comm_select_win32.cc comm_poll.cc \
-	comm_poll.h comm_epoll.cc comm_epoll.h comm_kqueue.cc \
+	comm_poll.h comm_epoll.cc comm_epoll.h comm_devpoll.cc \
+	comm_kqueue.cc \
 	comm_kqueue.h ConfigOption.cc ConfigParser.cc CommonPool.h \
 	CompositePoolNode.h delay_pools.cc DelayId.cc DelayId.h \
 	DelayIdComposite.h DelayBucket.cc DelayBucket.h DelayConfig.cc \
@@ -622,7 +625,8 @@
 	client_side_reply.cc client_side_request.cc ClientInfo.h \
 	clientStream.cc comm_select.cc comm_select.h \
 	comm_select_win32.cc comm_poll.cc comm_poll.h comm_epoll.cc \
-	comm_epoll.h comm_kqueue.cc comm_kqueue.h ConfigOption.cc \
+	comm_epoll.h comm_devpoll.cc \
+	comm_kqueue.cc comm_kqueue.h ConfigOption.cc \
 	ConfigParser.cc CommonPool.h CompositePoolNode.h \
 	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
 	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
@@ -716,7 +720,8 @@
 	client_side_reply.cc client_side_request.cc ClientInfo.h \
 	clientStream.cc comm_select.cc comm_select.h \
 	comm_select_win32.cc comm_poll.cc comm_poll.h comm_epoll.cc \
-	comm_epoll.h comm_kqueue.cc comm_kqueue.h ConfigOption.cc \
+	comm_epoll.h comm_devpoll.cc \
+	comm_kqueue.cc comm_kqueue.h ConfigOption.cc \
 	ConfigParser.cc CommonPool.h CompositePoolNode.h \
 	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
 	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
@@ -827,7 +832,8 @@
 	client_side_reply.cc client_side_request.cc ClientInfo.h \
 	clientStream.cc comm_select.cc comm_select.h \
 	comm_select_win32.cc comm_poll.cc comm_poll.h comm_epoll.cc \
-	comm_epoll.h comm_kqueue.cc comm_kqueue.h ConfigOption.cc \
+	comm_epoll.h comm_devpoll.cc \
+	comm_kqueue.cc comm_kqueue.h ConfigOption.cc \
 	ConfigParser.cc CommonPool.h CompositePoolNode.h \
 	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
 	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
@@ -1011,7 +1017,8 @@
 	client_side_reply.cc client_side_request.cc ClientInfo.h \
 	clientStream.cc comm_select.cc comm_select.h \
 	comm_select_win32.cc comm_poll.cc comm_poll.h comm_epoll.cc \
-	comm_epoll.h comm_kqueue.cc comm_kqueue.h ConfigOption.cc \
+	comm_epoll.h comm_devpoll.cc \
+	comm_kqueue.cc comm_kqueue.h ConfigOption.cc \
 	ConfigParser.cc CommonPool.h CompositePoolNode.h \
 	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
 	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
@@ -1145,7 +1152,8 @@
 	client_side_reply.cc client_side_request.cc ClientInfo.h \
 	clientStream.cc comm_select.cc comm_select.h \
 	comm_select_win32.cc comm_poll.cc comm_poll.h comm_epoll.cc \
-	comm_epoll.h comm_kqueue.cc comm_kqueue.h ConfigOption.cc \
+	comm_epoll.h comm_devpoll.cc \
+	comm_kqueue.cc comm_kqueue.h ConfigOption.cc \
 	ConfigParser.cc debug.cc CommonPool.h CompositePoolNode.h \
 	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
 	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
@@ -1723,6 +1731,7 @@
 	comm_poll.h \
 	comm_epoll.cc \
 	comm_epoll.h \
+	comm_devpoll.cc \
 	comm_kqueue.cc \
 	comm_kqueue.h
 
@@ -3904,6 +3913,7 @@
 @AMDEP_TRUE@@am__include@ @am__qu...@./$(DEPDIR)/client_side_request...@am__quote@
 @AMDEP_TRUE@@am__include@ @am__qu...@./$(DEPDIR)/comm....@am__quote@
 @AMDEP_TRUE@@am__include@ @am__qu...@./$(DEPDIR)/comm_epoll...@am__quote@
+...@amdep_true@@am__include@ @am__qu...@./$(DEPDIR)/comm_devpoll...@am__quote@
 @AMDEP_TRUE@@am__include@ @am__qu...@./$(DEPDIR)/comm_kqueue...@am__quote@
 @AMDEP_TRUE@@am__include@ @am__qu...@./$(DEPDIR)/comm_poll...@am__quote@
 @AMDEP_TRUE@@am__include@ @am__qu...@./$(DEPDIR)/comm_select...@am__quote@
Only in .: Makefile.in.orig
Common subdirectories: ../../squid-3.1.8/src/acl and ./acl
Common subdirectories: ../../squid-3.1.8/src/adaptation and ./adaptation
Common subdirectories: ../../squid-3.1.8/src/auth and ./auth
Common subdirectories: ../../squid-3.1.8/src/base and ./base
Only in .: comm_devpoll.cc
Common subdirectories: ../../squid-3.1.8/src/esi and ./esi
Common subdirectories: ../../squid-3.1.8/src/fs and ./fs
Common subdirectories: ../../squid-3.1.8/src/icmp and ./icmp
Common subdirectories: ../../squid-3.1.8/src/ident and ./ident
Common subdirectories: ../../squid-3.1.8/src/ip and ./ip
Common subdirectories: ../../squid-3.1.8/src/repl and ./repl
Common subdirectories: ../../squid-3.1.8/src/tests and ./tests
diff -u ../../squid-3.1.8/src/unlinkd.cc ./unlinkd.cc
--- ../../squid-3.1.8/src/unlinkd.cc	Sat Sep  4 04:25:57 2010
+++ ./unlinkd.cc	Mon Oct 11 11:39:08 2010
@@ -69,7 +69,7 @@
      * time.
      */
     if (queuelen >= UNLINKD_QUEUE_LIMIT) {
-#if defined(USE_EPOLL) || defined(USE_KQUEUE)
+#if defined(USE_EPOLL) || defined(USE_KQUEUE) || defined(USE_DEVPOLL)
         /*
          * DPW 2007-04-23
          * We can't use fd_set when using epoll() or kqueue().  In

Reply via email to