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
This commit is contained in:
Tom Tromey 1999-11-30 18:53:15 +00:00 committed by Tom Tromey
parent 90199fdb0a
commit 4cb74b7695
2 changed files with 10 additions and 1 deletions

View File

@ -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.

View File

@ -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);