apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aa...@apache.org
Subject cvs commit: apr/locks/win32 locks.c
Date Tue, 09 Apr 2002 06:56:56 GMT
aaron       02/04/08 23:56:56

  Modified:    atomic/unix apr_atomic.c
               include  apr_allocator.h apr_global_mutex.h apr_pools.h
                        apr_portable.h apr_proc_mutex.h apr_thread_mutex.h
               include/arch/unix proc_mutex.h
               include/arch/win32 thread_mutex.h
               locks/unix Makefile.in proc_mutex.c
               misc/unix start.c
  Removed:     include  apr_lock.h
               include/arch/unix locks.h
               include/arch/win32 locks.h
               locks/unix locks.c crossproc.c intraproc.c
               include/arch/beos locks.h
               include/arch/netware locks.h
               include/arch/os2 locks.h
               locks/beos locks.c
               locks/netware locks.c
               locks/os2 locks.c
               locks/win32 locks.c
  Log:
  ** DEPRECATE old lock API: apr_lock.h **
  
  Resolve some circular includes (apr_thread_mutex.h needs apr_pools.h needs
  apr_allocator.h needs apr_thread_mutex.h ...).
  
  Remove all apr_lock.h related files (incl. arch-specific headers and
  implementations).
  
  Revision  Changes    Path
  1.12      +1 -2      apr/atomic/unix/apr_atomic.c
  
  Index: apr_atomic.c
  ===================================================================
  RCS file: /home/cvs/apr/atomic/unix/apr_atomic.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- apr_atomic.c	19 Mar 2002 22:42:30 -0000	1.11
  +++ apr_atomic.c	9 Apr 2002 06:56:55 -0000	1.12
  @@ -54,9 +54,8 @@
   
   
   #include "apr.h"
  -#include "apr_lock.h"
  -#include "apr_thread_mutex.h"
   #include "apr_atomic.h"
  +#include "apr_thread_mutex.h"
   
   #if APR_HAS_THREADS
   
  
  
  
  1.4       +5 -4      apr/include/apr_allocator.h
  
  Index: apr_allocator.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_allocator.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_allocator.h	1 Apr 2002 05:42:38 -0000	1.3
  +++ apr_allocator.h	9 Apr 2002 06:56:55 -0000	1.4
  @@ -76,10 +76,6 @@
   #define APR_WANT_MEMFUNC
   #include "apr_want.h"
   
  -#include "apr_thread_mutex.h"
  -#include "apr_pools.h"
  -
  -
   /** the allocator structure */
   typedef struct apr_allocator_t apr_allocator_t;
   /** the structure which holds information about the allocation */
  @@ -132,6 +128,9 @@
   APR_DECLARE(void) apr_allocator_free(apr_allocator_t *allocator,
                                        apr_memnode_t *memnode);
   
  +
  +#include "apr_pools.h"
  +
   /**
    * Set the owner of the allocator
    * @param allocator The allocator to set the owner for
  @@ -151,6 +150,8 @@
    * @param allocator The allocator to get the owner from
    */
   APR_DECLARE(apr_pool_t *) apr_allocator_get_owner(apr_allocator_t *allocator);
  +
  +#include "apr_thread_mutex.h"
   
   #if APR_HAS_THREADS
   /**
  
  
  
  1.7       +1 -1      apr/include/apr_global_mutex.h
  
  Index: apr_global_mutex.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_global_mutex.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- apr_global_mutex.h	4 Apr 2002 18:33:56 -0000	1.6
  +++ apr_global_mutex.h	9 Apr 2002 06:56:55 -0000	1.7
  @@ -56,7 +56,7 @@
   #define APR_GLOBAL_MUTEX_H
   
   #include "apr.h"
  -#include "apr_lock.h"    /* only for apr_lockmech_e */
  +#include "apr_proc_mutex.h"    /* only for apr_lockmech_e */
   #include "apr_pools.h"
   #include "apr_errno.h"
   
  
  
  
  1.87      +2 -1      apr/include/apr_pools.h
  
  Index: apr_pools.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_pools.h,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- apr_pools.h	21 Mar 2002 08:38:37 -0000	1.86
  +++ apr_pools.h	9 Apr 2002 06:56:55 -0000	1.87
  @@ -120,7 +120,6 @@
           (const apr_##typename##_t *ob) { return ob->pool; }
   
   
  -#include "apr_allocator.h"
   
   /**
    * Pool debug levels
  @@ -206,6 +205,8 @@
   /*
    * Pool creation/destruction
    */
  +
  +#include "apr_allocator.h"
   
   /**
    * Create a new pool.
  
  
  
  1.77      +0 -29     apr/include/apr_portable.h
  
  Index: apr_portable.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_portable.h,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- apr_portable.h	16 Mar 2002 19:07:38 -0000	1.76
  +++ apr_portable.h	9 Apr 2002 06:56:55 -0000	1.77
  @@ -74,7 +74,6 @@
   #include "apr_file_io.h"
   #include "apr_network_io.h"
   #include "apr_errno.h"
  -#include "apr_lock.h"
   #include "apr_proc_mutex.h"
   #include "apr_time.h"
   #include "apr_dso.h"
  @@ -99,8 +98,6 @@
   typedef HANDLE                apr_os_file_t;
   typedef HANDLE                apr_os_dir_t;
   typedef SOCKET                apr_os_sock_t;
  -/* We're deprecating apr_lock_t, so apr_os_lock_t will be gone too. */
  -typedef HANDLE                apr_os_lock_t;
   typedef HANDLE                apr_os_proc_mutex_t;
   typedef HANDLE                apr_os_thread_t;
   typedef HANDLE                apr_os_proc_t;
  @@ -114,8 +111,6 @@
   typedef HFILE                 apr_os_file_t;
   typedef HDIR                  apr_os_dir_t;
   typedef int                   apr_os_sock_t;
  -/* We're deprecating apr_lock_t, so apr_os_lock_t will be gone too. */
  -typedef HMTX                  apr_os_lock_t;
   typedef HMTX                  apr_os_proc_mutex_t;
   typedef TID                   apr_os_thread_t;
   typedef PID                   apr_os_proc_t;
  @@ -137,8 +132,6 @@
   typedef int                   apr_os_file_t;
   typedef DIR                   apr_os_dir_t;
   typedef int                   apr_os_sock_t;
  -/* We're deprecating apr_lock_t, so apr_os_lock_t will be gone too. */
  -typedef struct apr_os_proc_mutex_t  apr_os_lock_t;
   typedef struct apr_os_proc_mutex_t  apr_os_proc_mutex_t;
   typedef thread_id             apr_os_thread_t;
   typedef thread_id             apr_os_proc_t;
  @@ -152,8 +145,6 @@
   typedef int                   apr_os_file_t;
   typedef DIR                   apr_os_dir_t;
   typedef int                   apr_os_sock_t;
  -/* We're deprecating apr_lock_t, so apr_os_lock_t will be gone too. */
  -typedef NXMutex_t             apr_os_lock_t;
   typedef NXMutex_t             apr_os_proc_mutex_t;
   typedef NXThreadId_t          apr_os_thread_t;
   typedef long                  apr_os_proc_t;
  @@ -186,8 +177,6 @@
   typedef int                   apr_os_file_t;
   typedef DIR                   apr_os_dir_t;
   typedef int                   apr_os_sock_t;
  -/* We're deprecating apr_lock_t, so apr_os_lock_t will be gone too. */
  -typedef struct apr_os_proc_mutex_t  apr_os_lock_t;
   typedef struct apr_os_proc_mutex_t  apr_os_proc_mutex_t;
   #if APR_HAS_THREADS && APR_HAVE_PTHREAD_H 
   typedef pthread_t             apr_os_thread_t;
  @@ -255,14 +244,6 @@
                                             apr_socket_t *sock);
   
   /**
  - * Convert the lock from os specific type to apr type
  - * @param oslock The os specific lock we are converting to.
  - * @param lock The apr lock to convert.
  - */
  -APR_DECLARE(apr_status_t) apr_os_lock_get(apr_os_lock_t *oslock, 
  -                                          apr_lock_t *lock);
  -
  -/**
    * Convert the proc mutex from os specific type to apr type
    * @param ospmutex The os specific proc mutex we are converting to.
    * @param pmutex The apr proc mutex to convert.
  @@ -396,16 +377,6 @@
   APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
                                              apr_os_sock_info_t *os_sock_info,
                                              apr_pool_t *cont);
  -
  -/**
  - * Convert the lock from os specific type to apr type
  - * @param lock The apr lock we are converting to.
  - * @param thelock The os specific lock to convert.
  - * @param cont The pool to use if it is needed.
  - */
  -APR_DECLARE(apr_status_t) apr_os_lock_put(apr_lock_t **lock,
  -                                          apr_os_lock_t *thelock,
  -                                          apr_pool_t *cont); 
   
   /**
    * Convert the proc mutex from os specific type to apr type
  
  
  
  1.7       +4 -1      apr/include/apr_proc_mutex.h
  
  Index: apr_proc_mutex.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_proc_mutex.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- apr_proc_mutex.h	4 Apr 2002 18:33:56 -0000	1.6
  +++ apr_proc_mutex.h	9 Apr 2002 06:56:55 -0000	1.7
  @@ -56,7 +56,6 @@
   #define APR_PROC_MUTEX_H
   
   #include "apr.h"
  -#include "apr_lock.h"    /* only for apr_lockmech_e_np */
   #include "apr_pools.h"
   #include "apr_errno.h"
   
  @@ -74,6 +73,10 @@
    * @ingroup APR
    * @{
    */
  +
  +typedef enum {APR_LOCK_FCNTL, APR_LOCK_FLOCK, APR_LOCK_SYSVSEM,
  +              APR_LOCK_PROC_PTHREAD, APR_LOCK_POSIXSEM,
  +              APR_LOCK_DEFAULT} apr_lockmech_e;
   
   typedef struct apr_proc_mutex_t apr_proc_mutex_t;
   
  
  
  
  1.10      +3 -1      apr/include/apr_thread_mutex.h
  
  Index: apr_thread_mutex.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_thread_mutex.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- apr_thread_mutex.h	20 Mar 2002 09:01:24 -0000	1.9
  +++ apr_thread_mutex.h	9 Apr 2002 06:56:55 -0000	1.10
  @@ -56,7 +56,6 @@
   #define APR_THREAD_MUTEX_H
   
   #include "apr.h"
  -#include "apr_pools.h"
   #include "apr_errno.h"
   
   #ifdef __cplusplus
  @@ -80,6 +79,9 @@
   
   #define APR_THREAD_MUTEX_DEFAULT  0x0
   #define APR_THREAD_MUTEX_NESTED   0x1
  +
  +/* Delayed the include to avoid a circular reference */
  +#include "apr_pools.h"
   
   /**
    * Create and initialize a mutex that can be used to synchronize threads.
  
  
  
  1.6       +0 -1      apr/include/arch/unix/proc_mutex.h
  
  Index: proc_mutex.h
  ===================================================================
  RCS file: /home/cvs/apr/include/arch/unix/proc_mutex.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- proc_mutex.h	4 Apr 2002 18:33:56 -0000	1.5
  +++ proc_mutex.h	9 Apr 2002 06:56:56 -0000	1.6
  @@ -148,7 +148,6 @@
       apr_pool_t *pool;
       const apr_proc_mutex_unix_lock_methods_t *meth;
       const apr_proc_mutex_unix_lock_methods_t *inter_meth;
  -    apr_lockscope_e scope;
       int curr_locked;
       char *fname;
   #if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
  
  
  
  1.4       +1 -1      apr/include/arch/win32/thread_mutex.h
  
  Index: thread_mutex.h
  ===================================================================
  RCS file: /home/cvs/apr/include/arch/win32/thread_mutex.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- thread_mutex.h	13 Mar 2002 20:39:20 -0000	1.3
  +++ thread_mutex.h	9 Apr 2002 06:56:56 -0000	1.4
  @@ -55,7 +55,7 @@
   #ifndef THREAD_MUTEX_H
   #define THREAD_MUTEX_H
   
  -#include "apr_lock.h"
  +#include "apr_pools.h"
   
   struct apr_thread_mutex_t {
       apr_pool_t *pool;
  
  
  
  1.24      +0 -3      apr/locks/unix/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apr/locks/unix/Makefile.in,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Makefile.in	18 Feb 2002 01:16:04 -0000	1.23
  +++ Makefile.in	9 Apr 2002 06:56:56 -0000	1.24
  @@ -1,8 +1,5 @@
   
   TARGETS = \
  -	locks.lo \
  -	crossproc.lo \
  -	intraproc.lo \
   	thread_mutex.lo \
   	thread_rwlock.lo \
   	thread_cond.lo \
  
  
  
  1.16      +2 -4      apr/locks/unix/proc_mutex.c
  
  Index: proc_mutex.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/unix/proc_mutex.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- proc_mutex.c	5 Apr 2002 13:49:45 -0000	1.15
  +++ proc_mutex.c	9 Apr 2002 06:56:56 -0000	1.16
  @@ -817,10 +817,8 @@
   {
       apr_status_t rv;
   
  -    if (new_mutex->scope != APR_INTRAPROCESS) {
  -        if ((rv = proc_mutex_choose_method(new_mutex, mech)) != APR_SUCCESS) {
  -            return rv;
  -        }
  +    if ((rv = proc_mutex_choose_method(new_mutex, mech)) != APR_SUCCESS) {
  +        return rv;
       }
   
       new_mutex->meth = new_mutex->inter_meth;
  
  
  
  1.64      +0 -2      apr/misc/unix/start.c
  
  Index: start.c
  ===================================================================
  RCS file: /home/cvs/apr/misc/unix/start.c,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- start.c	13 Mar 2002 20:39:23 -0000	1.63
  +++ start.c	9 Apr 2002 06:56:56 -0000	1.64
  @@ -57,7 +57,6 @@
   #include "apr_pools.h"
   #include "apr_signal.h"
   
  -#include "locks.h"      /* for apr_unix_setup_lock() */
   #include "proc_mutex.h" /* for apr_proc_mutex_unix_setup_lock() */
   #include "internal_time.h"
   
  @@ -84,7 +83,6 @@
       }
   
   #if !defined(BEOS) && !defined(OS2)
  -    apr_unix_setup_lock();
       apr_proc_mutex_unix_setup_lock();
       apr_unix_setup_time();
   #endif
  
  
  

Mime
View raw message