diff options
author | Tom Tromey <tromey@cygnus.com> | 1999-09-08 17:10:22 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 1999-09-08 17:10:22 +0000 |
commit | c45a8466e615418926ac97e765e7cee80c020698 (patch) | |
tree | 1c3b10128636af58dd8eff71ce989482c61ab5bf /libjava | |
parent | e1b6684ceca53685a860320b57573fcfa83d8e7f (diff) | |
download | gcc-c45a8466e615418926ac97e765e7cee80c020698.zip gcc-c45a8466e615418926ac97e765e7cee80c020698.tar.gz gcc-c45a8466e615418926ac97e765e7cee80c020698.tar.bz2 |
posix-threads.h (_Jv_PthreadCheckMonitor): Reverted previous change and implemented a correct test in the __m_count case.
* include/posix-threads.h (_Jv_PthreadCheckMonitor): Reverted
previous change and implemented a correct test in the __m_count
case.
From-SVN: r29209
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 4 | ||||
-rw-r--r-- | libjava/include/posix-threads.h | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 9d6080409..5092814 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,9 @@ 1999-09-08 Tom Tromey <tromey@cygnus.com> + * include/posix-threads.h (_Jv_PthreadCheckMonitor): Reverted + previous change and implemented a correct test in the __m_count + case. + * include/posix-threads.h (_Jv_PthreadCheckMonitor): Changed test in __m_count case. diff --git a/libjava/include/posix-threads.h b/libjava/include/posix-threads.h index 00a918f..38629f4 100644 --- a/libjava/include/posix-threads.h +++ b/libjava/include/posix-threads.h @@ -114,7 +114,9 @@ _Jv_PthreadCheckMonitor (_Jv_Mutex_t *mu) // On Linux we exploit knowledge of the implementation. int r = pmu->m_count == 1; #elif defined (PTHREAD_MUTEX_HAVE___M_COUNT) - int r = (pthread_t) pmu->__m_owner == pthread_self (); + // In glibc 2.1, the first time the mutex is grabbed __m_count is + // set to 0 and __m_owner is set to pthread_self(). + int r = ! pmu->__m_count; #else int r = mu->count == 0; #endif |