]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Kill unused nreadfds/nwritefds statistics in comm_poll, eleminating one
authorhno <>
Tue, 24 Jan 2006 22:32:02 +0000 (22:32 +0000)
committerhno <>
Tue, 24 Jan 2006 22:32:02 +0000 (22:32 +0000)
more reference to fd_set. The delay pool hooks still uses fd_set however
so comm_poll is not yet FD_SETSIZE neutral.

src/comm_poll.cc

index 6111a66f3574ad3c814d8c743914926d58a6dfd3..a5af95c2dbbf653cad49ba95db057bd2a24c2603 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm_poll.cc,v 1.13 2003/07/06 14:16:57 hno Exp $
+ * $Id: comm_poll.cc,v 1.14 2006/01/24 15:32:02 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -56,13 +56,6 @@ static int fdIsDns(int fd);
 static OBJH commIncomingStats;
 static int comm_check_incoming_poll_handlers(int nfds, int *fds);
 static void comm_poll_dns_incoming(void);
-static void commUpdateReadBits(int fd, PF * handler);
-static void commUpdateWriteBits(int fd, PF * handler);
-
-static fd_set global_readfds;
-static fd_set global_writefds;
-static int nreadfds;
-static int nwritefds;
 
 /*
  * Automatic tuning for incoming requests:
@@ -138,13 +131,11 @@ commSetSelect(int fd, unsigned int type, PF * handler, void *client_data,
     if (type & COMM_SELECT_READ) {
         F->read_handler = handler;
         F->read_data = client_data;
-        commUpdateReadBits(fd, handler);
     }
 
     if (type & COMM_SELECT_WRITE) {
         F->write_handler = handler;
         F->write_data = client_data;
-        commUpdateWriteBits(fd, handler);
     }
 
     if (timeout)
@@ -683,9 +674,6 @@ comm_select_init(void)
     cachemgrRegister("comm_incoming",
                      "comm_incoming() stats",
                      commIncomingStats, 0, 1);
-    FD_ZERO(&global_readfds);
-    FD_ZERO(&global_writefds);
-    nreadfds = nwritefds = 0;
 }
 
 
@@ -709,30 +697,6 @@ commIncomingStats(StoreEntry * sentry)
     statHistDump(&f->comm_http_incoming, sentry, statHistIntDumper);
 }
 
-void
-commUpdateReadBits(int fd, PF * handler)
-{
-    if (handler && !FD_ISSET(fd, &global_readfds)) {
-        FD_SET(fd, &global_readfds);
-        nreadfds++;
-    } else if (!handler && FD_ISSET(fd, &global_readfds)) {
-        FD_CLR(fd, &global_readfds);
-        nreadfds--;
-    }
-}
-
-void
-commUpdateWriteBits(int fd, PF * handler)
-{
-    if (handler && !FD_ISSET(fd, &global_writefds)) {
-        FD_SET(fd, &global_writefds);
-        nwritefds++;
-    } else if (!handler && FD_ISSET(fd, &global_writefds)) {
-        FD_CLR(fd, &global_writefds);
-        nwritefds--;
-    }
-}
-
 /* Called by async-io or diskd to speed up the polling */
 void
 comm_quick_poll_required(void)