You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/06/06 03:23:25 UTC
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_mt.h
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 <sh...@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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>