You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bh...@hyperreal.org on 1999/10/13 23:14:13 UTC

cvs commit: apache-2.0/src/modules/mpm/dexter acceptlock.h acceptlock.c

bhyde       99/10/13 14:14:11

  Modified:    src/modules/mpm/dexter acceptlock.h acceptlock.c
  Log:
  Modernize some dexter cleanups to return status.
  
  Revision  Changes    Path
  1.4       +3 -3      apache-2.0/src/modules/mpm/dexter/acceptlock.h
  
  Index: acceptlock.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/acceptlock.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- acceptlock.h	1999/08/31 05:33:21	1.3
  +++ acceptlock.h	1999/10/13 21:14:02	1.4
  @@ -88,7 +88,7 @@
   void accept_mutex_off(int);
   
   #elif defined (USE_SYSVSEM_SERIALIZED_ACCEPT)
  -void accept_mutex_cleanup(void *);
  +ap_status_t accept_mutex_cleanup(void *);
   #define accept_mutex_child_init(x)
   void accept_mutex_init(ap_context_t *, int);
   void accept_mutex_on(int);
  @@ -101,14 +101,14 @@
   void accept_mutex_off(int);
   
   #elif defined(USE_FLOCK_SERIALIZED_ACCEPT)
  -void accept_mutex_cleanup(void *);
  +ap_status_t accept_mutex_cleanup(void *);
   void accept_mutex_child_init(ap_context_t *);
   void accept_mutex_init(ap_context_t *, int);
   void accept_mutex_on(int);
   void accept_mutex_off(int);
   
   #elif defined(USE_OS2SEM_SERIALIZED_ACCEPT)
  -void accept_mutex_cleanup(void *);
  +ap_status_t accept_mutex_cleanup(void *);
   void accept_mutex_child_init(ap_context_t *);
   void accept_mutex_init(ap_context_t *, int);
   void accept_mutex_on(int);
  
  
  
  1.12      +13 -7     apache-2.0/src/modules/mpm/dexter/acceptlock.c
  
  Index: acceptlock.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/acceptlock.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- acceptlock.c	1999/10/11 22:39:42	1.11
  +++ acceptlock.c	1999/10/13 21:14:06	1.12
  @@ -239,7 +239,7 @@
   static sigset_t *accept_previous_masks = NULL;
   #endif
   
  -void accept_mutex_child_cleanup(void *foo)
  +ap_status_t accept_mutex_child_cleanup(void *foo)
   {
       int i;
      
  @@ -250,6 +250,7 @@
               }
   	}
       }
  +    return APR_SUCCESS;
   }
   void accept_mutex_child_init(ap_context_t *p)
   {
  @@ -259,7 +260,7 @@
   #endif
   }
   
  -void accept_mutex_cleanup(void *foo)
  +ap_status_t accept_mutex_cleanup(void *foo)
   {
       int i;
      
  @@ -269,6 +270,7 @@
   	perror("munmap");
       }
       accept_mutex = (void *)(caddr_t)-1;
  +    return APR_SUCCESS;
   }
   
   void accept_mutex_init(ap_context_t *p, int number_of_locks)
  @@ -396,18 +398,19 @@
    * means we have to be sure to clean this up or else we'll leak
    * semaphores.
    */
  -void accept_mutex_cleanup(void *foo)
  +ap_status_t accept_mutex_cleanup(void *foo)
   {
       union semun ick;
       int i;
   
       for (i = 0; i < lock_count; i++) {
           if (sem_id[i] < 0)
  -	  return;
  +	    return APR_SUCCESS; /* XXX */
   	/* this is ignored anyhow */
   	ick.val = 0;
   	semctl(sem_id[i], 0, IPC_RMID, ick);
       }
  +    return APR_SUCCESS;
   }
   
   
  @@ -557,7 +560,7 @@
   
   static int *lock_fd = NULL;
   
  -void accept_mutex_cleanup(void *foo)
  +ap_status_t accept_mutex_cleanup(void *foo)
   {
       int i;
     
  @@ -566,6 +569,7 @@
           lock_fname = expand_lock_fname(foo, i);
           unlink(lock_fname);
       }
  +    return APR_SUCCESS;
   }
   
   /*
  @@ -648,7 +652,7 @@
   
   static HMTX *lock_sem = NULL;
   
  -void accept_mutex_cleanup(void *foo)
  +ap_status_t accept_mutex_cleanup(void *foo)
   { 
       int i;
     
  @@ -656,6 +660,7 @@
           DosReleaseMutexSem(lock_sem[i]);
   	DosCloseMutexSem(lock_sem[i]);
       }
  +    return APR_SUCCESS;
   }
   
   /*
  @@ -727,10 +732,11 @@
   
   static int tpf_core_held;
   
  -static void accept_mutex_cleanup(void *foo)
  +static ap_status_t accept_mutex_cleanup(void *foo)
   {
       if(tpf_core_held)
           coruc(RESOURCE_KEY);
  +    return APR_SUCCESS;
   }
   
   #define accept_mutex_init(x)