httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/misc/unix start.c
Date Fri, 14 Apr 2000 02:12:56 GMT
dgaudet     00/04/13 19:12:56

  Modified:    src/lib/apr/locks/unix crossproc.c intraproc.c locks.c
                        locks.h
               src/lib/apr/misc/unix start.c
  Log:
  namespace cleanup in locks/unix
  
  Revision  Changes    Path
  1.26      +31 -27    apache-2.0/src/lib/apr/locks/unix/crossproc.c
  
  Index: crossproc.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/crossproc.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- crossproc.c	2000/04/14 01:56:24	1.25
  +++ crossproc.c	2000/04/14 02:12:55	1.26
  @@ -59,7 +59,8 @@
   static struct sembuf op_on;
   static struct sembuf op_off;
   
  -void setup_lock() {
  +void ap_unix_setup_lock(void)
  +{
       op_on.sem_num = 0;
       op_on.sem_op = -1;
       op_on.sem_flg = SEM_UNDO;
  @@ -68,7 +69,7 @@
       op_off.sem_flg = SEM_UNDO;
   }
   
  -ap_status_t lock_cleanup(void *lock_)
  +static ap_status_t lock_cleanup(void *lock_)
   {
       ap_lock_t *lock=lock_;
       union semun ick;
  @@ -80,7 +81,7 @@
       return APR_SUCCESS;
   }    
   
  -ap_status_t create_inter_lock(ap_lock_t *new)
  +ap_status_t ap_unix_create_inter_lock(ap_lock_t *new)
   {
       union semun ick;
       
  @@ -100,7 +101,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t lock_inter(ap_lock_t *lock)
  +ap_status_t ap_unix_lock_inter(ap_lock_t *lock)
   {
       lock->curr_locked = 1;
       if (semop(lock->interproc, &op_on, 1) < 0) {
  @@ -109,7 +110,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t unlock_inter(ap_lock_t *lock)
  +ap_status_t ap_unix_unlock_inter(ap_lock_t *lock)
   {
       if (semop(lock->interproc, &op_off, 1) < 0) {
           return errno;
  @@ -118,7 +119,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t destroy_inter_lock(ap_lock_t *lock)
  +ap_status_t ap_unix_destroy_inter_lock(ap_lock_t *lock)
   {
       ap_status_t stat;
   
  @@ -129,7 +130,7 @@
       return stat;
   }
   
  -ap_status_t child_init_lock(ap_lock_t **lock, ap_context_t *cont,
  +ap_status_t ap_unix_child_init_lock(ap_lock_t **lock, ap_context_t *cont,
                               const char *fname)
   {
       return APR_SUCCESS;
  @@ -137,10 +138,11 @@
   
   #elif defined (USE_PROC_PTHREAD_SERIALIZE)  
   
  -void setup_lock() {
  +void ap_unix_setup_lock(void)
  +{
   }
   
  -ap_status_t lock_cleanup(void *lock_)
  +static ap_status_t lock_cleanup(void *lock_)
   {
       ap_lock_t *lock=lock_;
   
  @@ -155,7 +157,7 @@
       return APR_SUCCESS;
   }    
   
  -ap_status_t create_inter_lock(ap_lock_t *new)
  +ap_status_t ap_unix_create_inter_lock(ap_lock_t *new)
   {
       ap_status_t stat;
       int fd;
  @@ -198,7 +200,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t lock_inter(ap_lock_t *lock)
  +ap_status_t ap_unix_lock_inter(ap_lock_t *lock)
   {
       ap_status_t stat;
       lock->curr_locked = 1;
  @@ -208,7 +210,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t unlock_inter(ap_lock_t *lock)
  +ap_status_t ap_unix_unlock_inter(ap_lock_t *lock)
   {
       ap_status_t stat;
   
  @@ -219,7 +221,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t destroy_inter_lock(ap_lock_t *lock)
  +ap_status_t ap_unix_destroy_inter_lock(ap_lock_t *lock)
   {
       ap_status_t stat;
       if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
  @@ -229,7 +231,7 @@
       return stat;
   }
   
  -ap_status_t child_init_lock(ap_lock_t **lock, ap_context_t *cont,
  +ap_status_t ap_unix_child_init_lock(ap_lock_t **lock, ap_context_t *cont,
                               const char *fname)
   {
       return APR_SUCCESS;
  @@ -240,7 +242,8 @@
   static struct flock lock_it;
   static struct flock unlock_it;
   
  -void setup_lock() {
  +void ap_unix_setup_lock(void)
  +{
       lock_it.l_whence = SEEK_SET;        /* from current point */
       lock_it.l_start = 0;                /* -"- */
       lock_it.l_len = 0;                  /* until end of file */
  @@ -266,7 +269,7 @@
       return APR_SUCCESS;
   }    
   
  -ap_status_t create_inter_lock(ap_lock_t *new)
  +ap_status_t ap_unix_create_inter_lock(ap_lock_t *new)
   {
       new->interproc = open(new->fname, O_CREAT | O_WRONLY | O_EXCL, 0644);
   
  @@ -281,7 +284,7 @@
       return APR_SUCCESS; 
   }
   
  -ap_status_t lock_inter(ap_lock_t *lock)
  +ap_status_t ap_unix_lock_inter(ap_lock_t *lock)
   {
       lock->curr_locked=1;
       if (fcntl(lock->interproc, F_SETLKW, &lock_it) < 0) {
  @@ -290,7 +293,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t unlock_inter(ap_lock_t *lock)
  +ap_status_t ap_unix_unlock_inter(ap_lock_t *lock)
   {
       if (fcntl(lock->interproc, F_SETLKW, &unlock_it) < 0) {
           return errno;
  @@ -299,7 +302,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t destroy_inter_lock(ap_lock_t *lock)
  +ap_status_t ap_unix_destroy_inter_lock(ap_lock_t *lock)
   {
       ap_status_t stat;
       if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
  @@ -309,7 +312,7 @@
       return stat;
   }
   
  -ap_status_t child_init_lock(ap_lock_t **lock, ap_context_t *cont,
  +ap_status_t ap_unix_child_init_lock(ap_lock_t **lock, ap_context_t *cont,
                               const char *fname)
   {
       return APR_SUCCESS;
  @@ -317,10 +320,11 @@
   
   #elif defined (USE_FLOCK_SERIALIZE)
   
  -void setup_lock() {
  +void ap_unix_setup_lock(void)
  +{
   }
   
  -ap_status_t lock_cleanup(void *lock_)
  +static ap_status_t lock_cleanup(void *lock_)
   {
       ap_lock_t *lock=lock_;
   
  @@ -334,7 +338,7 @@
       return APR_SUCCESS;
   }    
   
  -ap_status_t create_inter_lock(ap_lock_t *new)
  +ap_status_t ap_unix_create_inter_lock(ap_lock_t *new)
   {
       new->interproc = open(new->fname, O_CREAT | O_WRONLY | O_EXCL, 0600);
   
  @@ -347,7 +351,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t lock_inter(ap_lock_t *lock)
  +ap_status_t ap_unix_lock_inter(ap_lock_t *lock)
   {
       lock->curr_locked = 1;
       if (flock(lock->interproc, LOCK_EX) < 0) {
  @@ -356,7 +360,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t unlock_inter(ap_lock_t *lock)
  +ap_status_t ap_unix_unlock_inter(ap_lock_t *lock)
   {
       if (flock(lock->interproc, LOCK_UN) < 0) {
           return errno;
  @@ -365,7 +369,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t destroy_inter_lock(ap_lock_t *lock)
  +ap_status_t ap_unix_destroy_inter_lock(ap_lock_t *lock)
   {
       ap_status_t stat;
       if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
  @@ -375,7 +379,7 @@
       return stat;
   }
   
  -ap_status_t child_init_lock(ap_lock_t **lock, ap_context_t *cont,
  +ap_status_t ap_unix_child_init_lock(ap_lock_t **lock, ap_context_t *cont,
                               const char *fname)
   {
       ap_lock_t *new;
  
  
  
  1.14      +5 -5      apache-2.0/src/lib/apr/locks/unix/intraproc.c
  
  Index: intraproc.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/intraproc.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- intraproc.c	2000/04/03 19:44:50	1.13
  +++ intraproc.c	2000/04/14 02:12:55	1.14
  @@ -58,13 +58,13 @@
   
   #if defined(USE_PTHREAD_SERIALIZE)  
   
  -ap_status_t lock_intra_cleanup(void *data)
  +static ap_status_t lock_intra_cleanup(void *data)
   {
       ap_lock_t *lock = (ap_lock_t *) data;
       return pthread_mutex_unlock(lock->intraproc);
   }    
   
  -ap_status_t create_intra_lock(ap_lock_t *new)
  +ap_status_t ap_unix_create_intra_lock(ap_lock_t *new)
   {
       ap_status_t stat;
       pthread_mutexattr_t mattr;
  @@ -95,12 +95,12 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t lock_intra(ap_lock_t *lock)
  +ap_status_t ap_unix_lock_intra(ap_lock_t *lock)
   {
       return pthread_mutex_lock(lock->intraproc);
   }
   
  -ap_status_t unlock_intra(ap_lock_t *lock)
  +ap_status_t ap_unix_unlock_intra(ap_lock_t *lock)
   {
       ap_status_t status;
   
  @@ -108,7 +108,7 @@
       return status;
   }
   
  -ap_status_t destroy_intra_lock(ap_lock_t *lock)
  +ap_status_t ap_unix_destroy_intra_lock(ap_lock_t *lock)
   {
       ap_status_t stat;
       if ((stat = lock_intra_cleanup(lock)) == APR_SUCCESS) {
  
  
  
  1.27      +9 -9      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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- locks.c	2000/04/14 01:56:24	1.26
  +++ locks.c	2000/04/14 02:12:55	1.27
  @@ -82,7 +82,7 @@
   
       if (scope != APR_CROSS_PROCESS) {
   #if APR_HAS_THREADS
  -        if ((stat = create_intra_lock(new)) != APR_SUCCESS) {
  +        if ((stat = ap_unix_create_intra_lock(new)) != APR_SUCCESS) {
               return stat;
           }
   #else
  @@ -90,7 +90,7 @@
   #endif
       }
       if (scope != APR_INTRAPROCESS) {
  -        if ((stat = create_inter_lock(new)) != APR_SUCCESS) {
  +        if ((stat = ap_unix_create_inter_lock(new)) != APR_SUCCESS) {
               return stat;
           }
       }
  @@ -103,7 +103,7 @@
       ap_status_t stat;
       if (lock->scope != APR_CROSS_PROCESS) {
   #if APR_HAS_THREADS
  -        if ((stat = lock_intra(lock)) != APR_SUCCESS) {
  +        if ((stat = ap_unix_lock_intra(lock)) != APR_SUCCESS) {
               return stat;
           }
   #else
  @@ -111,7 +111,7 @@
   #endif
       }
       if (lock->scope != APR_INTRAPROCESS) {
  -        if ((stat = lock_inter(lock)) != APR_SUCCESS) {
  +        if ((stat = ap_unix_lock_inter(lock)) != APR_SUCCESS) {
               return stat;
           }
       }
  @@ -124,7 +124,7 @@
   
       if (lock->scope != APR_CROSS_PROCESS) {
   #if APR_HAS_THREADS
  -        if ((stat = unlock_intra(lock)) != APR_SUCCESS) {
  +        if ((stat = ap_unix_unlock_intra(lock)) != APR_SUCCESS) {
               return stat;
           }
   #else
  @@ -132,7 +132,7 @@
   #endif
       }
       if (lock->scope != APR_INTRAPROCESS) {
  -        if ((stat = unlock_inter(lock)) != APR_SUCCESS) {
  +        if ((stat = ap_unix_unlock_inter(lock)) != APR_SUCCESS) {
               return stat;
           }
       }
  @@ -144,7 +144,7 @@
       ap_status_t stat;
       if (lock->scope != APR_CROSS_PROCESS) {
   #if APR_HAS_THREADS
  -        if ((stat = destroy_intra_lock(lock)) != APR_SUCCESS) {
  +        if ((stat = ap_unix_destroy_intra_lock(lock)) != APR_SUCCESS) {
               return stat;
           }
   #else
  @@ -152,7 +152,7 @@
   #endif
       }
       if (lock->scope != APR_INTRAPROCESS) {
  -        if ((stat = destroy_inter_lock(lock)) != APR_SUCCESS) {
  +        if ((stat = ap_unix_destroy_inter_lock(lock)) != APR_SUCCESS) {
               return stat;
           }
       }
  @@ -164,7 +164,7 @@
   {
       ap_status_t stat;
       if ((*lock)->scope != APR_CROSS_PROCESS) {
  -        if ((stat = child_init_lock(lock, cont, fname)) != APR_SUCCESS) {
  +        if ((stat = ap_unix_child_init_lock(lock, cont, fname)) != APR_SUCCESS) {
               return stat;
           }
       }
  
  
  
  1.18      +10 -10    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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- locks.h	2000/04/14 01:56:24	1.17
  +++ locks.h	2000/04/14 02:12:55	1.18
  @@ -138,19 +138,19 @@
   };
   
   #if APR_HAS_THREADS
  -ap_status_t create_intra_lock(struct ap_lock_t *new);
  -ap_status_t lock_intra(struct ap_lock_t *lock);
  -ap_status_t unlock_intra(struct ap_lock_t *lock);
  -ap_status_t destroy_intra_lock(struct ap_lock_t *lock);
  +ap_status_t ap_unix_create_intra_lock(struct ap_lock_t *new);
  +ap_status_t ap_unix_lock_intra(struct ap_lock_t *lock);
  +ap_status_t ap_unix_unlock_intra(struct ap_lock_t *lock);
  +ap_status_t ap_unix_destroy_intra_lock(struct ap_lock_t *lock);
   #endif
   
  -void setup_lock();
  -ap_status_t create_inter_lock(struct ap_lock_t *new);
  -ap_status_t lock_inter(struct ap_lock_t *lock);
  -ap_status_t unlock_inter(struct ap_lock_t *lock);
  -ap_status_t destroy_inter_lock(struct ap_lock_t *lock);
  +void ap_unix_setup_lock(void);
  +ap_status_t ap_unix_create_inter_lock(struct ap_lock_t *new);
  +ap_status_t ap_unix_lock_inter(struct ap_lock_t *lock);
  +ap_status_t ap_unix_unlock_inter(struct ap_lock_t *lock);
  +ap_status_t ap_unix_destroy_inter_lock(struct ap_lock_t *lock);
   
  -ap_status_t child_init_lock(struct ap_lock_t **lock, ap_context_t *cont, 
  +ap_status_t ap_unix_child_init_lock(struct ap_lock_t **lock, ap_context_t *cont, 
                               const char *fname);
   
   #endif  /* LOCKS_H */
  
  
  
  1.27      +1 -1      apache-2.0/src/lib/apr/misc/unix/start.c
  
  Index: start.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/start.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- start.c	2000/04/14 01:38:42	1.26
  +++ start.c	2000/04/14 02:12:56	1.27
  @@ -149,7 +149,7 @@
   {
       ap_status_t status;
   #ifndef BEOS
  -    setup_lock();
  +    ap_unix_setup_lock();
   #endif
       status = ap_init_alloc();
       return status;
  
  
  

Mime
View raw message