tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/common jk_mt.h
Date Thu, 06 Jun 2002 01:23:25 GMT
costin      2002/06/05 18:23:25

  Modified:    jk/native/common jk_mt.h
  Log:
  Ops... Stupid error in mt, may cause deadlocks under high load.
  
  Thanks Jean-Francois Nadeau for reporting it.
  
  Revision  Changes    Path
  1.3       +4 -4      jakarta-tomcat-connectors/jk/native/common/jk_mt.h
  
  Index: jk_mt.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_mt.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_mt.h	18 Jun 2001 14:15:57 -0000	1.2
  +++ jk_mt.h	6 Jun 2002 01:23:25 -0000	1.3
  @@ -58,7 +58,7 @@
   /***************************************************************************
    * Description: Multi thread portability code for JK                       *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
  - * Version:     $Revision: 1.2 $                                           *
  + * Version:     $Revision: 1.3 $                                           *
    ***************************************************************************/
   
   #ifndef _JK_MT_H
  @@ -98,13 +98,13 @@
               if(pthread_mutex_init(x, NULL)) rc = JK_FALSE; else rc = JK_TRUE; 
   
           #define JK_DELETE_CS(x, rc)\
  -            if(pthread_mutex_lock(x)) rc = JK_FALSE; else rc = JK_TRUE; 
  +            if(pthread_mutex_destroy(x)) rc = JK_FALSE; else rc = JK_TRUE; 
   
           #define JK_ENTER_CS(x, rc)\
  -            if(pthread_mutex_unlock(x)) rc = JK_FALSE; else rc = JK_TRUE; 
  +            if(pthread_mutex_lock(x)) rc = JK_FALSE; else rc = JK_TRUE; 
   
           #define JK_LEAVE_CS(x, rc)\
  -            if(pthread_mutex_destroy(x)) rc = JK_FALSE; else rc = JK_TRUE; 
  +            if(pthread_mutex_unlock(x)) rc = JK_FALSE; else rc = JK_TRUE; 
       #endif /* Unix pthreads */
   
   #else /* Not an MT code */
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message