apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject cvs commit: apr/threadproc/win32 thread.c
Date Wed, 11 Apr 2001 02:01:23 GMT
gregames    01/04/10 19:01:23

  Modified:    server/mpm/perchild perchild.c
               server/mpm/threaded threaded.c
               include  apr_thread_proc.h
               include/arch/unix threadproc.h
               threadproc/beos thread.c
               threadproc/os2 thread.c
               threadproc/unix thread.c
               threadproc/win32 thread.c
  Log:
  Fix the naming of the apr_threadattr_detach_xxx functions.  get and set were
  reversed.
  
  This may have broken the Unix threaded mpm's when they started using the
  bogus "set" function.  A likely symptom would be failure to stop a threaded
  process cleanly.
  
  Note: it appears these functions are essentially no-ops except in Unix.
  
  Revision  Changes    Path
  1.59      +1 -1      httpd-2.0/server/mpm/perchild/perchild.c
  
  Index: perchild.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/perchild/perchild.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -d -b -u -r1.58 -r1.59
  --- perchild.c	2001/04/05 17:03:13	1.58
  +++ perchild.c	2001/04/11 02:01:14	1.59
  @@ -917,7 +917,7 @@
                       NULL, pchild);
   
       apr_threadattr_create(&worker_thread_attr, pchild);
  -    apr_threadattr_detach_set(worker_thread_attr);                                    

  +    apr_threadattr_detach_set(worker_thread_attr, 1);                                 
   
       apr_create_signal_thread(&thread, worker_thread_attr, check_signal, pchild);
   
       /* We are creating worker threads right now */
  
  
  
  1.20      +1 -1      httpd-2.0/server/mpm/threaded/threaded.c
  
  Index: threaded.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/threaded.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -d -b -u -r1.19 -r1.20
  --- threaded.c	2001/04/03 18:50:07	1.19
  +++ threaded.c	2001/04/11 02:01:16	1.20
  @@ -657,7 +657,7 @@
       apr_lock_create(&pipe_of_death_mutex, APR_MUTEX, APR_INTRAPROCESS, 
                       NULL, pchild);
       apr_threadattr_create(&thread_attr, pchild);
  -    apr_threadattr_detach_set(thread_attr);
  +    apr_threadattr_detach_set(thread_attr, 1);
   
       rv = apr_create_signal_thread(&thread, thread_attr, check_signal, pchild);
       if (rv != APR_SUCCESS) {
  
  
  
  1.61      +6 -6      apr/include/apr_thread_proc.h
  
  Index: apr_thread_proc.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_thread_proc.h,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -d -b -u -r1.60 -r1.61
  --- apr_thread_proc.h	2001/02/25 14:46:21	1.60
  +++ apr_thread_proc.h	2001/04/11 02:01:17	1.61
  @@ -165,20 +165,20 @@
                                                   apr_pool_t *cont);
   
   /**
  - * Set if newly created threads should be created in detach mode.
  + * Set if newly created threads should be created in detached state.
    * @param attr The threadattr to affect 
    * @param on Thread detach state on or off
  - * @deffunc apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t
on)
  + * @deffunc apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr, apr_int32_t
on)
    */
  -APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr, 
  +APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr, 
                                                      apr_int32_t on);
   
   /**
  - * Get the detach mode for this threadattr.
  + * Get the detach state for this threadattr.
    * @param attr The threadattr to reference 
  - * @deffunc apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr)
  + * @deffunc apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr)
    */
  -APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr);
  +APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr);
   
   /**
    * Create a new thread of execution
  
  
  
  1.18      +1 -0      apr/include/arch/unix/threadproc.h
  
  Index: threadproc.h
  ===================================================================
  RCS file: /home/cvs/apr/include/arch/unix/threadproc.h,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -d -b -u -r1.17 -r1.18
  --- threadproc.h	2001/02/25 20:39:32	1.17
  +++ threadproc.h	2001/04/11 02:01:18	1.18
  @@ -86,6 +86,7 @@
   #define SHELL_PATH "/bin/sh"
   
   #if APR_HAS_THREADS
  +
   struct apr_thread_t {
       apr_pool_t *cntxt;
       pthread_t *td;
  
  
  
  1.20      +2 -2      apr/threadproc/beos/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/beos/thread.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -d -b -u -r1.19 -r1.20
  --- thread.c	2001/02/16 04:16:16	1.19
  +++ thread.c	2001/04/11 02:01:19	1.20
  @@ -69,7 +69,7 @@
       return APR_SUCCESS;
   }
   
  -apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on)
  +apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr, apr_int32_t on)
   {
   	if (on == 1){
   		attr->detached = 1;
  @@ -79,7 +79,7 @@
       return APR_SUCCESS;
   }
   
  -apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr)
  +apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr)
   {
   	if (attr->detached == 1){
   		return APR_DETACH;
  
  
  
  1.21      +2 -2      apr/threadproc/os2/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/os2/thread.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -d -b -u -r1.20 -r1.21
  --- thread.c	2001/03/19 12:35:15	1.20
  +++ thread.c	2001/04/11 02:01:21	1.21
  @@ -77,7 +77,7 @@
   
   
   
  -apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on)
  +apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr, apr_int32_t on)
   {
       attr->attr |= APR_THREADATTR_DETACHED;
       return APR_SUCCESS;
  @@ -85,7 +85,7 @@
   
   
   
  -apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr)
  +apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr)
   {
       return (attr->attr & APR_THREADATTR_DETACHED) ? APR_DETACH : APR_NOTDETACH;
   }
  
  
  
  1.37      +2 -2      apr/threadproc/unix/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/unix/thread.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -d -b -u -r1.36 -r1.37
  --- thread.c	2001/02/25 01:24:37	1.36
  +++ thread.c	2001/04/11 02:01:22	1.37
  @@ -82,7 +82,7 @@
       return stat;
   }
   
  -apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on)
  +apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr, apr_int32_t on)
   {
       apr_status_t stat;
   #ifdef PTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR
  @@ -102,7 +102,7 @@
       }
   }
   
  -apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr)
  +apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr)
   {
       int state;
   
  
  
  
  1.31      +2 -2      apr/threadproc/win32/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/win32/thread.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -d -b -u -r1.30 -r1.31
  --- thread.c	2001/02/16 04:16:20	1.30
  +++ thread.c	2001/04/11 02:01:23	1.31
  @@ -75,14 +75,14 @@
       return APR_SUCCESS;
   }
   
  -APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr,
  +APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr,
                                                      apr_int32_t on)
   {
       attr->detach = on;
   	return APR_SUCCESS;
   }
   
  -APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr)
  +APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr)
   {
       if (attr->detach == 1)
           return APR_DETACH;
  
  
  

Mime
View raw message