aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-30 18:53:15 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-30 18:53:15 +0000
commita89e8f8811709ecdec6e49d62eae986256de15cc (patch)
tree2fecb4a23a3d69309b1cb9deb2e358fb2f97c178 /libjava
parentf8c770311048730087702c1404cdd2cb5225bc60 (diff)
* posix-threads.cc (_Jv_MutexInit): Use _Jv_PthreadGetMutex to get
mutex to initialize. Initialize `count' if required. Fixes PR libgcj/98. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30725 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/posix-threads.cc5
2 files changed, 10 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index f9abaeeeda2..e14c6e9789f 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,9 @@
+1999-11-30 Tom Tromey <tromey@cygnus.com>
+
+ * posix-threads.cc (_Jv_MutexInit): Use _Jv_PthreadGetMutex to get
+ mutex to initialize. Initialize `count' if required.
+ Fixes PR libgcj/98.
+
1999-11-27 Per Bothner <per@bothner.com>
* exception.cc: Remove prototype declarations for malloc and free.
diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc
index 19c7241cf88..0a3311d428f 100644
--- a/libjava/posix-threads.cc
+++ b/libjava/posix-threads.cc
@@ -165,7 +165,10 @@ _Jv_MutexInit (_Jv_Mutex_t *mu)
val = &attr;
#endif
- pthread_mutex_init (mu, val);
+ pthread_mutex_init (_Jv_PthreadGetMutex (mu), val);
+#ifdef PTHREAD_MUTEX_IS_STRUCT
+ mu->count = 0;
+#endif
#if defined (HAVE_PTHREAD_MUTEXATTR_SETTYPE) || defined (HAVE_PTHREAD_MUTEXATTR_SETKIND_NP)
pthread_mutexattr_destroy (&attr);