httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/threaded threaded.c
Date Tue, 12 Jun 2001 12:55:23 GMT
trawick     01/06/12 05:55:23

  Modified:    .        configure.in
               server/mpm/threaded threaded.c
  Log:
  get threaded.c to compile on non-AIX systems which have sys/processor.h
  
  if we want to call bindprocessor(), we should check for bindprocessor(),
  not some header file
  
  (prefork and perchild to be fixed shortly)
  
  Revision  Changes    Path
  1.163     +1 -0      httpd-2.0/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/configure.in,v
  retrieving revision 1.162
  retrieving revision 1.163
  diff -u -r1.162 -r1.163
  --- configure.in	2001/06/11 22:45:45	1.162
  +++ configure.in	2001/06/12 12:55:20	1.163
  @@ -201,6 +201,7 @@
   
   AC_CHECK_FUNCS( \
   initgroups \
  +bindprocessor \
   )
   
   AC_CHECK_LIB(nsl, gethostbyname)
  
  
  
  1.34      +7 -6      httpd-2.0/server/mpm/threaded/threaded.c
  
  Index: threaded.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/threaded.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- threaded.c	2001/06/11 21:41:50	1.33
  +++ threaded.c	2001/06/12 12:55:22	1.34
  @@ -72,6 +72,9 @@
   #if APR_HAVE_SYS_WAIT_H
   #include <sys/wait.h> 
   #endif
  +#ifdef HAVE_SYS_PROCESSOR_H
  +#include <sys/processor.h> /* for bindprocessor() */
  +#endif
   
   #if !APR_HAS_THREADS
   #error The threaded MPM requires APR threads, but they are unavailable.
  @@ -803,18 +806,16 @@
       }
   
       if (!pid) {
  -#ifdef HAVE_SYS_PROCESSOR_H
  -      /* By default, AIX binds to a single processor.  This bit unbinds
  -	 children which will then bind to another CPU.
  -      */
  -#include <sys/processor.h>
  +#ifdef HAVE_BINDPROCESSOR
  +        /* By default, AIX binds to a single processor.  This bit unbinds
  +	 * children which will then bind to another CPU.
  +         */
           int status = bindprocessor(BINDPROCESS, (int)getpid(),
   			       PROCESSOR_CLASS_ANY);
   	if (status != OK)
   	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, ap_server_conf,
   			 "processor unbind failed %d", status);
   #endif
  -
           RAISE_SIGSTOP(MAKE_CHILD);
   
           apr_signal(SIGTERM, just_die);
  
  
  

Mime
View raw message