diff options
author | Tom Tromey <tromey@cygnus.com> | 1999-11-30 18:53:15 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 1999-11-30 18:53:15 +0000 |
commit | 4cb74b7695ec04b8705326d38b0baa8eb1f2a449 (patch) | |
tree | 2fecb4a23a3d69309b1cb9deb2e358fb2f97c178 /libjava | |
parent | 90199fdb0a2ea5345d3cbd0512c47b358954e72e (diff) | |
download | gcc-4cb74b7695ec04b8705326d38b0baa8eb1f2a449.zip gcc-4cb74b7695ec04b8705326d38b0baa8eb1f2a449.tar.gz gcc-4cb74b7695ec04b8705326d38b0baa8eb1f2a449.tar.bz2 |
re GNATS libgcj/98 (pthread_mutex_init in libjava/posix-threads.cc)
* posix-threads.cc (_Jv_MutexInit): Use _Jv_PthreadGetMutex to get
mutex to initialize. Initialize `count' if required.
Fixes PR libgcj/98.
From-SVN: r30725
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/posix-threads.cc | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index f9abaee..e14c6e9 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 19c7241..0a3311d 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); |