cvs commit: apache-apr/pthreads/src/os/unix Makefile.tmpl multithread.c

1999-05-30 Thread manoj
manoj   99/05/30 16:49:02

  Modified:pthreads/src/main Makefile.tmpl alloc.c scoreboard.c
   pthreads/src/modules/proxy Makefile.tmpl proxy_cache.c
proxy_util.c
   pthreads/src/modules/standard Makefile.tmpl mod_unique_id.c
   pthreads/src/os/unix Makefile.tmpl
  Removed: pthreads/src/include multithread.h
   pthreads/src/os/unix multithread.c
  Log:
  More code cleanup. Get rid of multithread.[ch], so that we have one
  consistent scheme for using mutexes, and to simplify the switch to a
  portable runtime.
  
  Revision  ChangesPath
  1.9   +2 -2  apache-apr/pthreads/src/main/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/Makefile.tmpl,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -u -r1.8 -r1.9
  --- Makefile.tmpl 1999/04/17 03:35:54 1.8
  +++ Makefile.tmpl 1999/05/30 23:48:58 1.9
  @@ -72,7 +72,7 @@
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
$(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/apr.h \
  - $(INCDIR)/util_uri.h $(INCDIR)/multithread.h $(INCDIR)/http_log.h
  + $(INCDIR)/util_uri.h $(INCDIR)/http_log.h
   buff.o: buff.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
  @@ -176,7 +176,7 @@
$(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/apr.h \
$(INCDIR)/util_uri.h $(INCDIR)/http_log.h $(INCDIR)/http_main.h \
$(INCDIR)/http_core.h $(INCDIR)/http_conf_globals.h \
  - $(INCDIR)/scoreboard.h $(INCDIR)/multithread.h
  + $(INCDIR)/scoreboard.h
   util.o: util.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
  
  
  
  1.6   +14 -17apache-apr/pthreads/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/alloc.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -u -r1.5 -r1.6
  --- alloc.c   1999/04/09 03:43:28 1.5
  +++ alloc.c   1999/05/30 23:48:58 1.6
  @@ -63,10 +63,10 @@
*/
   
   #include "httpd.h"
  -#include "multithread.h"
   #include "http_log.h"
   
   #include 
  +#include 
   
   /* debugging support, define this to enable code which helps detect re-use
* of freed memory and other such nonsense.
  @@ -199,8 +199,7 @@
   
   
   static union block_hdr *block_freelist = NULL;
  -static mutex *alloc_mutex = NULL;
  -static mutex *spawn_mutex = NULL;
  +static pthread_mutex_t alloc_mutex = PTHREAD_MUTEX_INITIALIZER;
   #ifdef POOL_DEBUG
   static char *known_stack_point;
   static int stack_direction;
  @@ -320,7 +319,7 @@
   if (blok == NULL)
return; /* Sanity check --- freeing empty pool? */
   
  -(void) ap_acquire_mutex(alloc_mutex);
  +(void) pthread_mutex_lock(&alloc_mutex);
   old_free_list = block_freelist;
   block_freelist = blok;
   
  @@ -339,7 +338,7 @@
   /* Finally, reset next pointer to get the old free blocks back */
   
   blok->h.next = old_free_list;
  -(void) ap_release_mutex(alloc_mutex);
  +(void) pthread_mutex_unlock(&alloc_mutex);
   #endif
   }
   
  @@ -388,9 +387,9 @@
   {
   union block_hdr *blok;
   
  -(void) ap_acquire_mutex(alloc_mutex);
  +(void) pthread_mutex_lock(&alloc_mutex);
   blok = new_block(min_size);
  -(void) ap_release_mutex(alloc_mutex);
  +(void) pthread_mutex_unlock(&alloc_mutex);
   return blok;
   }
   
  @@ -435,7 +434,7 @@
   union block_hdr *blok;
   root_pool *new_pool;
   
  -(void) ap_acquire_mutex(alloc_mutex);
  +(void) pthread_mutex_lock(&alloc_mutex);
   
   blok = new_block(ROOT_HDR_BYTES);
   new_pool = (root_pool *) blok->h.first_avail;
  @@ -449,7 +448,7 @@
   new_pool->p.first = new_pool->p.last = blok;
   new_pool->p.thread_root = new_pool;
   
  -(void) ap_release_mutex(alloc_mutex);
  +(void) pthread_mutex_unlock(&alloc_mutex);
   return (pool *)new_pool;
   }
   
  @@ -513,8 +512,6 @@
   known_stack_point = &s;
   stack_var_init(&s);
   #endif
  -alloc_mutex = ap_create_mutex(NULL);
  -spawn_mutex = ap_create_mutex(NULL);
   permanent_pool = ap_make_root_pool();
   
   return permanent_pool;
  @@ -554,7 +551,7 @@
   {
   ap_clear_pool(a);
   
  -(void) ap_acquire_mutex(alloc_mutex);
  +(void) pthread_mutex_lock(&alloc_mutex);
   if (a->parent) {
if (a->parent->sub_pools == a)
a->parent->sub_pools = a->sub_next;
  @@ -563,7 +560,7 @@
if (a->sub_next)
a->sub

cvs commit: apache-1.3/src/modules/standard Makefile.OS2

1999-05-30 Thread bjh
bjh 99/05/30 02:12:33

  Modified:src/modules/standard Makefile.OS2
  Log:
  Make unique_id module's OS/2 DLL name match that which is output by configure
  
  Revision  ChangesPath
  1.2   +1 -1  apache-1.3/src/modules/standard/Makefile.OS2
  
  Index: Makefile.OS2
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/Makefile.OS2,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.OS2  1999/05/04 11:21:14 1.1
  +++ Makefile.OS2  1999/05/30 09:12:32 1.2
  @@ -102,7 +102,7 @@
   status.dll: mod_status.o mod_status.def
$(mkdll)
   
  -uniqueid.dll: mod_unique_id.o mod_unique_id.def
  +unique_i.dll: mod_unique_id.o mod_unique_id.def
$(mkdll)
   
   userdir.dll: mod_userdir.o mod_userdir.def
  
  
  


cvs commit: apache-1.3/src/main http_log.c

1999-05-30 Thread bjh
bjh 99/05/30 01:55:30

  Modified:src/main http_log.c
  Log:
  Fix piped logs under OS/2
  
  Revision  ChangesPath
  1.78  +8 -4  apache-1.3/src/main/http_log.c
  
  Index: http_log.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_log.c,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- http_log.c1999/04/27 20:36:31 1.77
  +++ http_log.c1999/05/30 08:55:29 1.78
  @@ -172,8 +172,10 @@
   child_pid = spawnl(_P_NOWAIT, SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, 
NULL);
   return(child_pid);
   #elif defined(OS2)
  -/* For OS/2 we need to use a '/' */
  -execl(SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, NULL);
  +/* For OS/2 we need to use a '/' and spawn the child rather than exec as
  + * we haven't forked */
  +child_pid = spawnl(P_NOWAIT, SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, 
NULL);
  +return(child_pid);
   #else
   execl(SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, NULL);
   #endif
  @@ -727,8 +729,10 @@
   child_pid = spawnl(_P_NOWAIT, SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, 
NULL);
   return(child_pid);
   #elif defined(OS2)
  -/* For OS/2 we need to use a '/' */
  -execl (SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, NULL);
  +/* For OS/2 we need to use a '/' and spawn the child rather than exec as
  + * we haven't forked */
  +child_pid = spawnl(P_NOWAIT, SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, 
NULL);
  +return(child_pid);
   #else
   execl (SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, NULL);
   #endif