This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Patch: pthread fix
- To: Java Patch List <java-patches at sourceware dot cygnus dot com>
- Subject: Patch: pthread fix
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 21 Sep 1999 16:59:29 -0600
- Reply-To: tromey at cygnus dot com
When using POSIX threads on OSs other than Linux, posix-threads.h had
a couple errors. The appended fixes them.
1999-09-21 Tom Tromey <tromey@cygnus.com>
* include/posix-threads.h (_Jv_MutexDestroy): Use
_Jv_PthreadGetMutex.
(_Jv_MutexLock): Likewise.
(_Jv_MutexUnlock): Likewise.
Tom
Index: include/posix-threads.h
===================================================================
RCS file: /cvs/java/libgcj/libjava/include/posix-threads.h,v
retrieving revision 1.7
diff -u -r1.7 posix-threads.h
--- posix-threads.h 1999/09/08 17:10:22 1.7
+++ posix-threads.h 1999/09/21 22:57:46
@@ -194,7 +194,7 @@
inline void
_Jv_MutexDestroy (_Jv_Mutex_t *mu)
{
- pthread_mutex_destroy (mu);
+ pthread_mutex_destroy (_Jv_PthreadGetMutex (mu));
}
#else /* HAVE_RECURSIVE_MUTEX */
@@ -209,7 +209,7 @@
inline int
_Jv_MutexLock (_Jv_Mutex_t *mu)
{
- int r = pthread_mutex_lock (mu);
+ int r = pthread_mutex_lock (_Jv_PthreadGetMutex (mu));
#ifdef PTHREAD_MUTEX_IS_STRUCT
if (! r)
++mu->count;
@@ -220,7 +220,7 @@
inline int
_Jv_MutexUnlock (_Jv_Mutex_t *mu)
{
- int r = pthread_mutex_unlock (mu);
+ int r = pthread_mutex_unlock (_Jv_PthreadGetMutex (mu));
#ifdef PTHREAD_MUTEX_IS_STRUCT
if (! r)
--mu->count;