]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Merged changes from SQUID_3_0
authorserassio <>
Sun, 17 Feb 2008 18:01:02 +0000 (18:01 +0000)
committerserassio <>
Sun, 17 Feb 2008 18:01:02 +0000 (18:01 +0000)
src/comm_select_win32.cc

index e925b874fca81b39f0283ca3959fa1a9be5d6f1b..29d3fc5a7a4f4a89e74f41b4528c2a9652dd6023 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm_select_win32.cc,v 1.4 2007/04/30 16:56:09 wessels Exp $
+ * $Id: comm_select_win32.cc,v 1.4.6.1 2008/02/17 11:01:02 serassio Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -191,36 +191,6 @@ fdIsHttp(int fd)
     return 0;
 }
 
-#if DELAY_POOLS
-static int slowfdcnt = 0;
-static int slowfdarr[SQUID_MAXFD];
-
-static void
-commAddSlowFd(int fd)
-{
-    assert(slowfdcnt < SQUID_MAXFD);
-    slowfdarr[slowfdcnt++] = fd;
-}
-
-static int
-commGetSlowFd(void)
-{
-    int whichfd, retfd;
-
-    if (!slowfdcnt)
-        return -1;
-
-    whichfd = squid_random() % slowfdcnt;
-
-    retfd = slowfdarr[whichfd];
-
-    slowfdarr[whichfd] = slowfdarr[--slowfdcnt];
-
-    return retfd;
-}
-
-#endif
-
 static int
 comm_check_incoming_select_handlers(int nfds, int *fds)
 {
@@ -365,10 +335,6 @@ comm_select(int msec)
     fd_set readfds;
     fd_set pendingfds;
     fd_set writefds;
-#if DELAY_POOLS
-
-    fd_set slowfds;
-#endif
 
     PF *hdl = NULL;
     int fd;
@@ -394,10 +360,6 @@ comm_select(int msec)
         double start;
         getCurrentTime();
         start = current_dtime;
-#if DELAY_POOLS
-
-        FD_ZERO(&slowfds);
-#endif
 
         if (commCheckICPIncoming)
             comm_select_icp_incoming();
@@ -500,7 +462,7 @@ comm_select(int msec)
 
         getCurrentTime();
 
-        debugs(5, num ? 5 : 8, "comm_select: " << num << "+" << pending << " FDs ready\n");
+        debugs(5, num ? 5 : 8, "comm_select: " << num << "+" << pending << " FDs ready");
 
         statHistCount(&statCounter.select_fds_hist, num);
 
@@ -562,16 +524,9 @@ comm_select(int msec)
 
             if (NULL == (hdl = F->read_handler))
                 (void) 0;
-
-#if DELAY_POOLS
-
-            else if (FD_ISSET(fd, &slowfds))
-                commAddSlowFd(fd);
-
-#endif
-
             else {
                 F->read_handler = NULL;
+                F->flags.read_pending = 0;
                 commUpdateReadBits(fd, NULL);
                 hdl(fd, F->read_data);
                 statCounter.select_fds++;
@@ -667,8 +622,6 @@ comm_select(int msec)
 
                 if (commCheckHTTPIncoming)
                     comm_select_http_incoming();
-
-
             }
         }
 
@@ -681,30 +634,6 @@ comm_select(int msec)
         if (callhttp)
             comm_select_http_incoming();
 
-#if DELAY_POOLS
-
-        while ((fd = commGetSlowFd()) != -1) {
-            F = &fd_table[fd];
-            debugs(5, 6, "comm_select: slow FD " << fd << " selected for reading");
-
-            if ((hdl = F->read_handler)) {
-                F->read_handler = NULL;
-                commUpdateReadBits(fd, NULL);
-                hdl(fd, F->read_data);
-                statCounter.select_fds++;
-
-                if (commCheckICPIncoming)
-                    comm_select_icp_incoming();
-
-                if (commCheckDNSIncoming)
-                    comm_select_dns_incoming();
-
-                if (commCheckHTTPIncoming)
-                    comm_select_http_incoming();
-            }
-        }
-
-#endif
         getCurrentTime();
 
         statCounter.select_time += (current_dtime - start);