diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-30 18:53:15 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-30 18:53:15 +0000 |
commit | a89e8f8811709ecdec6e49d62eae986256de15cc (patch) | |
tree | 2fecb4a23a3d69309b1cb9deb2e358fb2f97c178 /libjava/posix-threads.cc | |
parent | f8c770311048730087702c1404cdd2cb5225bc60 (diff) | |
download | gcc-a89e8f8811709ecdec6e49d62eae986256de15cc.tar.gz |
* 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/posix-threads.cc')
-rw-r--r-- | libjava/posix-threads.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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); |