Patch: pthread fix
Tom Tromey
tromey@cygnus.com
Tue Sep 21 16:01:00 GMT 1999
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;
More information about the Java-patches
mailing list