httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@hyperreal.org
Subject cvs commit: apache-2.0/mpm/src/modules/mpm/mpmt_pthread http_accept.c
Date Wed, 30 Jun 1999 19:10:41 GMT
manoj       99/06/30 12:10:40

  Modified:    mpm/src/modules/mpm/mpmt_pthread http_accept.c
  Log:
  Take out support for SINGLE_LISTEN_UNSERIALIZED_ACCEPT, at least for
  now.
  
  Revision  Changes    Path
  1.4       +7 -16     apache-2.0/mpm/src/modules/mpm/mpmt_pthread/http_accept.c
  
  Index: http_accept.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/mpmt_pthread/http_accept.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -d -u -r1.3 -r1.4
  --- http_accept.c	1999/06/29 02:49:27	1.3
  +++ http_accept.c	1999/06/30 19:10:40	1.4
  @@ -77,13 +77,9 @@
   #if defined (USE_ACCEPT_QUEUE)
   #include "fdqueue.h"
   
  -#ifdef SINGLE_LISTEN_UNSERIALIZED_ACCEPT
  -/* Each thread only listens to one socket in this model, so the starvation
  - * problem described in manual/misc/perf-tuning.html can't occur here */
  -#define SAFE_ACCEPT(stmt) 
  -#else
  +/* In the current state of the server, It is never safe not to do accept
  + * serialization. Maybe we can change this. */
   #define SAFE_ACCEPT(stmt) do {stmt;} while(0)
  -#endif
   
   /* The queue of sockets we've accepted */
   static FDQueue csd_queue;
  @@ -293,16 +289,15 @@
   
   #elif defined(USE_MULTI_ACCEPT)
   
  -#ifdef SINGLE_LISTEN_UNSERIALIZED_ACCEPT
  -#define SAFE_ACCEPT(stmt) do {if (ap_listeners->next != NULL) {stmt;}} while(0)
  -#else
  -#define SAFE_ACCEPT(stmt) do {stmt;} while(0)
  -#endif
  -
   /*
    * USE_MULTI_ACCEPT
    * Worker threads do the accept and process the request. 
    */
  +
  +/* In the current state of the server, It is never safe not to do accept
  + * serialization. Maybe we can change this. */
  +#define SAFE_ACCEPT(stmt) do {stmt;} while(0)
  +
   static struct pollfd *listenfds;
   static int last_pollfd = 0;
   
  @@ -404,10 +399,6 @@
                   continue;
               }
   
  -            /* This conditional is used because the single listen case
  -             * is the only one where the accept might not be serialized.
  -             * In that case, multiple threads mucking around with
  -             * listenfds or last_pollfd will be harmful */
               if (num_listenfds == 1) {
   	        /* only one socket, just pretend we did the other stuff */
   	        sd = ap_listeners->fd;
  
  
  

Mime
View raw message