apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/memory/unix apr_pools.c
Date Fri, 14 Dec 2001 20:14:10 GMT
trawick     01/12/14 12:14:09

  Modified:    memory/unix apr_pools.c
  Log:
  get the new pools code to compile when !APR_HAS_THREADS
  
  Revision  Changes    Path
  1.122     +9 -1      apr/memory/unix/apr_pools.c
  
  Index: apr_pools.c
  ===================================================================
  RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
  retrieving revision 1.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- apr_pools.c	2001/12/14 12:06:59	1.121
  +++ apr_pools.c	2001/12/14 20:14:09	1.122
  @@ -124,7 +124,11 @@
   
   struct allocator_t {
       apr_uint32_t        max_index;
  +#if APR_HAS_THREADS
       apr_thread_mutex_t *mutex;
  +#else
  +    void               *mutex;
  +#endif
       apr_pool_t         *owner;
       node_t             *free[MAX_INDEX];
   };
  @@ -449,7 +453,11 @@
   {
       node_t *node, *active, **ref;
       allocator_t *allocator;
  +#if APR_HAS_THREADS
       apr_thread_mutex_t *mutex;
  +#else
  +    void *mutex;
  +#endif
       apr_uint32_t index;
   
       /* Destroy the subpools.  The subpools will detach themselve from 
  @@ -524,7 +532,6 @@
       apr_pool_t *pool;
       node_t *node;
       allocator_t *allocator, *new_allocator;
  -    apr_status_t rv;
   
       *newpool = NULL;
   
  @@ -560,6 +567,7 @@
   
   #if APR_HAS_THREADS
           if ((flags & APR_POOL_FLOCK) == APR_POOL_FLOCK) {
  +            apr_status_t rv;
               if ((rv = apr_thread_mutex_create(&allocator->mutex, 
                       APR_THREAD_MUTEX_DEFAULT, pool)) != APR_SUCCESS) {
                   node_free(allocator, node);
  
  
  

Mime
View raw message