diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-08 17:10:22 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-08 17:10:22 +0000 |
| commit | 52e15502bed323e0b169b0c44644d7fd0e612dee (patch) | |
| tree | 1c3b10128636af58dd8eff71ce989482c61ab5bf /libjava/include | |
| parent | 9520c8bb1ffb69c480042e8a5f432bafe98b4683 (diff) | |
| download | ppe42-gcc-52e15502bed323e0b169b0c44644d7fd0e612dee.tar.gz ppe42-gcc-52e15502bed323e0b169b0c44644d7fd0e612dee.zip | |
* include/posix-threads.h (_Jv_PthreadCheckMonitor): Reverted
previous change and implemented a correct test in the __m_count
case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29209 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include')
| -rw-r--r-- | libjava/include/posix-threads.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/include/posix-threads.h b/libjava/include/posix-threads.h index 00a918fab27..38629f44b01 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 |

