Commit 4cb74b76 by Tom Tromey Committed by Tom Tromey

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
parent 90199fdb
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> 1999-11-27 Per Bothner <per@bothner.com>
* exception.cc: Remove prototype declarations for malloc and free. * exception.cc: Remove prototype declarations for malloc and free.
......
...@@ -165,7 +165,10 @@ _Jv_MutexInit (_Jv_Mutex_t *mu) ...@@ -165,7 +165,10 @@ _Jv_MutexInit (_Jv_Mutex_t *mu)
val = &attr; val = &attr;
#endif #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) #if defined (HAVE_PTHREAD_MUTEXATTR_SETTYPE) || defined (HAVE_PTHREAD_MUTEXATTR_SETKIND_NP)
pthread_mutexattr_destroy (&attr); pthread_mutexattr_destroy (&attr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment