diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-01 21:03:18 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-01 21:03:18 +0000 |
commit | a9238c8993e02e735b35fe39bf6710f24ee23b03 (patch) | |
tree | 03902269d263d5fdbf51b709ce65fe57c0a73bb6 /libjava/posix-threads.cc | |
parent | 40711cc2bcba0e9473cdd269b6c67a45f1ede13e (diff) | |
download | gcc-a9238c8993e02e735b35fe39bf6710f24ee23b03.tar.gz |
* posix-threads.cc (_Jv_CondWait): Use _Jv_PthreadGetMutex.
* include/posix-threads.h (_Jv_Mutex_t): Define as structure,
except on Linux.
(_Jv_PthreadGetMutex): New function.
(_Jv_PthreadCheckMonitor): Use it.
(_Jv_MutexInit): Likewise. ALso, initialize `count'.
(_Jv_MutexLock): Update `count'.
(_Jv_MutexUnlock): Likewise.
(_Jv_PthreadCheckMonitor): Use Linux-specific knowledge when
appropriate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29032 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/posix-threads.cc')
-rw-r--r-- | libjava/posix-threads.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc index 413f7c3bfce..9701596ea81 100644 --- a/libjava/posix-threads.cc +++ b/libjava/posix-threads.cc @@ -79,12 +79,7 @@ _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu, return 1; int r; - pthread_mutex_t *pmu; -#ifdef HAVE_RECURSIVE_MUTEX - pmu = mu; -#else - pmu = &mu->mutex2; -#endif + pthread_mutex_t *pmu = _Jv_PthreadGetMutex (mu); if (millis == 0 && nanos == 0) r = pthread_cond_wait (cv, pmu); |