httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ron...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/locks/unix locks.c locks.h
Date Fri, 10 Mar 2000 04:15:40 GMT
ronald      00/03/09 20:15:40

  Modified:    src/lib/apr/locks/beos locks.c locks.h
               src/lib/apr/locks/os2 locks.c locks.h
               src/lib/apr/locks/unix locks.c locks.h
  Log:
  changed erroneous references to type to scope; added scope to lock_t
  
  Revision  Changes    Path
  1.9       +10 -9     apache-2.0/src/lib/apr/locks/beos/locks.c
  
  Index: locks.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/locks.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- locks.c	2000/03/10 00:06:15	1.8
  +++ locks.c	2000/03/10 04:15:38	1.9
  @@ -68,15 +68,16 @@
       }
       
       new->cntxt = cont;
  -    new->type = type;
  +    new->type  = type;
  +    new->scope = scope;
       new->fname = ap_pstrdup(cont, fname);
   
  -    if (type != APR_CROSS_PROCESS) {
  +    if (scope != APR_CROSS_PROCESS) {
           if ((stat = create_intra_lock(new)) != APR_SUCCESS) {
               return stat;
           }
       }
  -    if (type != APR_INTRAPROCESS) {
  +    if (scope != APR_INTRAPROCESS) {
           if ((stat = create_inter_lock(new)) != APR_SUCCESS) {
               return stat;
           }
  @@ -89,12 +90,12 @@
   {
       ap_status_t stat;
       
  -    if (lock->type != APR_CROSS_PROCESS) {
  +    if (lock->scope != APR_CROSS_PROCESS) {
           if ((stat = lock_intra(lock)) != APR_SUCCESS) {
               return stat;
           }
       }
  -    if (lock->type != APR_INTRAPROCESS) {
  +    if (lock->scope != APR_INTRAPROCESS) {
           if ((stat = lock_inter(lock)) != APR_SUCCESS) {
               return stat;
           }
  @@ -105,12 +106,12 @@
   ap_status_t ap_unlock(ap_lock_t *lock)
   {
       ap_status_t stat;
  -    if (lock->type != APR_CROSS_PROCESS) {
  +    if (lock->scope != APR_CROSS_PROCESS) {
           if ((stat = unlock_intra(lock)) != APR_SUCCESS) {
               return stat;
           }
       }
  -    if (lock->type != APR_INTRAPROCESS) {
  +    if (lock->scope != APR_INTRAPROCESS) {
           if ((stat = unlock_inter(lock)) != APR_SUCCESS) {
               return stat;
           }
  @@ -121,12 +122,12 @@
   ap_status_t ap_destroy_lock(ap_lock_t *lock)
   {
       ap_status_t stat; 
  -    if (lock->type != APR_CROSS_PROCESS) {
  +    if (lock->scope != APR_CROSS_PROCESS) {
           if ((stat = destroy_intra_lock(lock)) != APR_SUCCESS) {
               return stat;
           }
       }
  -    if (lock->type != APR_INTRAPROCESS) {
  +    if (lock->scope != APR_INTRAPROCESS) {
           if ((stat = destroy_inter_lock(lock)) != APR_SUCCESS) {
               return stat;
           }
  
  
  
  1.4       +2 -1      apache-2.0/src/lib/apr/locks/beos/locks.h
  
  Index: locks.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/locks.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- locks.h	2000/03/10 00:06:15	1.3
  +++ locks.h	2000/03/10 04:15:39	1.4
  @@ -64,6 +64,7 @@
   struct lock_t {
       ap_context_t *cntxt;
       ap_locktype_e type;
  +    ap_lockscope_e scope;
       int curr_locked;
       char *fname;
   	/* Inter proc */
  @@ -72,7 +73,7 @@
   	/* Intra Proc */
   	sem_id sem_intraproc;
   	int32  ben_intraproc;
  -    /* At some point, we should do a type for both inter and intra process
  +    /* At some point, we should do a scope for both inter and intra process
        *  locking here.  Something like pthread_mutex with PTHREAD_PROCESS_SHARED
        */    
   };
  
  
  
  1.8       +3 -2      apache-2.0/src/lib/apr/locks/os2/locks.c
  
  Index: locks.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/os2/locks.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- locks.c	2000/03/10 00:06:16	1.7
  +++ locks.c	2000/03/10 04:15:39	1.8
  @@ -87,7 +87,8 @@
   
       new = (struct lock_t *)ap_palloc(cont, sizeof(struct lock_t));
       new->cntxt = cont;
  -    new->type = type;
  +    new->type  = type;
  +    new->scope = scope;
       new->owner = 0;
       new->lock_count = 0;
       new->fname = ap_pstrdup(cont, fname);
  @@ -98,7 +99,7 @@
       else
           semname = ap_pstrcat(cont, "/SEM32/", fname, NULL);
   
  -    rc = DosCreateMutexSem(semname, &(new->hMutex), type == APR_CROSS_PROCESS ?
DC_SEM_SHARED : 0, FALSE);
  +    rc = DosCreateMutexSem(semname, &(new->hMutex), scope == APR_CROSS_PROCESS ?
DC_SEM_SHARED : 0, FALSE);
       *lock = new;
   
       if (!rc)
  
  
  
  1.4       +1 -0      apache-2.0/src/lib/apr/locks/os2/locks.h
  
  Index: locks.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/os2/locks.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- locks.h	2000/03/10 00:06:16	1.3
  +++ locks.h	2000/03/10 04:15:39	1.4
  @@ -63,6 +63,7 @@
   struct lock_t {
       ap_context_t *cntxt;
       ap_locktype_e type;
  +    ap_lockscope_e scope;
       char *fname;
       HMTX hMutex;
       TID owner;
  
  
  
  1.20      +19 -15    apache-2.0/src/lib/apr/locks/unix/locks.c
  
  Index: locks.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/locks.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- locks.c	2000/03/10 00:06:18	1.19
  +++ locks.c	2000/03/10 04:15:39	1.20
  @@ -57,19 +57,22 @@
   #include "apr_portable.h"
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_create_lock(ap_context_t *, ap_locktype_e, char *, 
  - *                            ap_lock_t **)
  + * ap_status_t ap_create_lock(ap_context_t *, ap_locktype_e,
  + *                            ap_lockscope_e scope, char *, ap_lock_t **)
    *    Create a new instance of a lock structure. 
    * arg 1) The context to operate on.
    * arg 2) The type of lock to create, one of:
  + *            APR_MUTEX
  + *            APR_READWRITE
  + * arg 3) The scope of the lock to create, one of:
    *            APR_CROSS_PROCESS -- lock processes from the protected area.
    *            APR_INTRAPROCESS  -- lock threads from the protected area.
    *            APR_LOCKALL       -- lock processes and threads from the
    *                                 protected area.
  - * arg 3) A file name to use if the lock mechanism requires one.  This
  + * arg 4) A file name to use if the lock mechanism requires one.  This
    *        argument should always be provided.  The lock code itself will
    *        determine if it should be used.
  - * arg 4) The newly created lock structure.
  + * arg 5) The newly created lock structure.
    * NOTE:  APR_CROSS_PROCESS may lock both processes and threads, but it is
    *        only guaranteed to lock processes.
    */
  @@ -83,10 +86,11 @@
       new = (struct lock_t *)ap_palloc(cont, sizeof(struct lock_t));
   
       new->cntxt = cont;
  -    new->type = type;
  +    new->type  = type;
  +    new->scope = scope;
   #if defined(USE_FCNTL_SERIALIZE) || defined(USE_FLOCK_SERIALIZE)
       /* file-based serialization primitives */
  -    if (type != APR_INTRAPROCESS) {
  +    if (scope != APR_INTRAPROCESS) {
           if (fname != NULL) {
               new->fname = ap_pstrdup(cont, fname);
           }
  @@ -97,7 +101,7 @@
       }
   #endif
   
  -    if (type != APR_CROSS_PROCESS) {
  +    if (scope != APR_CROSS_PROCESS) {
   #if APR_HAS_THREADS
           if ((stat = create_intra_lock(new)) != APR_SUCCESS) {
               return stat;
  @@ -106,7 +110,7 @@
           return APR_ENOTIMPL;
   #endif
       }
  -    if (type != APR_INTRAPROCESS) {
  +    if (scope != APR_INTRAPROCESS) {
           if ((stat = create_inter_lock(new)) != APR_SUCCESS) {
               return stat;
           }
  @@ -123,7 +127,7 @@
   ap_status_t ap_lock(struct lock_t *lock)
   {
       ap_status_t stat;
  -    if (lock->type != APR_CROSS_PROCESS) {
  +    if (lock->scope != APR_CROSS_PROCESS) {
   #if APR_HAS_THREADS
           if ((stat = lock_intra(lock)) != APR_SUCCESS) {
               return stat;
  @@ -132,7 +136,7 @@
           return APR_ENOTIMPL;
   #endif
       }
  -    if (lock->type != APR_INTRAPROCESS) {
  +    if (lock->scope != APR_INTRAPROCESS) {
           if ((stat = lock_inter(lock)) != APR_SUCCESS) {
               return stat;
           }
  @@ -149,7 +153,7 @@
   {
       ap_status_t stat;
   
  -    if (lock->type != APR_CROSS_PROCESS) {
  +    if (lock->scope != APR_CROSS_PROCESS) {
   #if APR_HAS_THREADS
           if ((stat = unlock_intra(lock)) != APR_SUCCESS) {
               return stat;
  @@ -158,7 +162,7 @@
           return APR_ENOTIMPL;
   #endif
       }
  -    if (lock->type != APR_INTRAPROCESS) {
  +    if (lock->scope != APR_INTRAPROCESS) {
           if ((stat = unlock_inter(lock)) != APR_SUCCESS) {
               return stat;
           }
  @@ -176,7 +180,7 @@
   ap_status_t ap_destroy_lock(struct lock_t *lock)
   {
       ap_status_t stat;
  -    if (lock->type != APR_CROSS_PROCESS) {
  +    if (lock->scope != APR_CROSS_PROCESS) {
   #if APR_HAS_THREADS
           if ((stat = destroy_intra_lock(lock)) != APR_SUCCESS) {
               return stat;
  @@ -185,7 +189,7 @@
           return APR_ENOTIMPL;
   #endif
       }
  -    if (lock->type != APR_INTRAPROCESS) {
  +    if (lock->scope != APR_INTRAPROCESS) {
           if ((stat = destroy_inter_lock(lock)) != APR_SUCCESS) {
               return stat;
           }
  @@ -210,7 +214,7 @@
   ap_status_t ap_child_init_lock(struct lock_t **lock, char *fname, ap_context_t *cont)
   {
       ap_status_t stat;
  -    if ((*lock)->type != APR_CROSS_PROCESS) {
  +    if ((*lock)->scope != APR_CROSS_PROCESS) {
           if ((stat = child_init_lock(lock, cont, fname)) != APR_SUCCESS) {
               return stat;
           }
  
  
  
  1.13      +2 -1      apache-2.0/src/lib/apr/locks/unix/locks.h
  
  Index: locks.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/locks.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- locks.h	2000/03/10 00:06:18	1.12
  +++ locks.h	2000/03/10 04:15:40	1.13
  @@ -108,6 +108,7 @@
   struct lock_t {
       ap_context_t *cntxt;
       ap_locktype_e type;
  +    ap_lockscope_e scope;
       int curr_locked;
       char *fname;
   #if USE_SYSVSEM_SERIALIZE
  @@ -128,7 +129,7 @@
       pthread_mutex_t *intraproc;
   #endif
   #endif
  -    /* At some point, we should do a type for both inter and intra process
  +    /* At some point, we should do a scope for both inter and intra process
        *  locking here.  Something like pthread_mutex with PTHREAD_PROCESS_SHARED
        */    
   };
  
  
  

Mime
View raw message