diff options
author | gandalf <gandalf@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-13 21:21:27 +0000 |
---|---|---|
committer | gandalf <gandalf@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-13 21:21:27 +0000 |
commit | 3e4199b00d3700b8fa3757778826c8be6bc90be6 (patch) | |
tree | 201f04847c4885c882291734f9d02d175d841698 /libjava | |
parent | bb0578782fc7e912baf8eb5ace9b9046aa4d95aa (diff) | |
download | gcc-3e4199b00d3700b8fa3757778826c8be6bc90be6.tar.gz |
Use pthread_equal rather than != to compare thread IDs.
2013-03-12 Andrew John Hughes <gnu.andrew@redhat.com>
* include/posix-threads.h:
(_Jv_MutexCheckMonitor(_Jv_Mutex_t)): Use
pthread_equal rather than !=.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196639 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/include/posix-threads.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d5f508de4b7..7ad315ed8b9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2013-03-12 Andrew John Hughes <gnu.andrew@redhat.com> + + * include/posix-threads.h: + (_Jv_MutexCheckMonitor(_Jv_Mutex_t)): Use + pthread_equal rather than !=. + 2013-01-07 H.J. Lu <hongjiu.lu@intel.com> * Makefile.am (lib_gnu_awt_xlib_la_LDFLAGS): Replace diff --git a/libjava/include/posix-threads.h b/libjava/include/posix-threads.h index 59e65f74499..1ec311d7fa0 100644 --- a/libjava/include/posix-threads.h +++ b/libjava/include/posix-threads.h @@ -79,7 +79,7 @@ typedef struct inline int _Jv_MutexCheckMonitor (_Jv_Mutex_t *mu) { - return (mu->owner != pthread_self()); + return (pthread_equal(mu->owner, pthread_self()) == 0); } // Type identifying a POSIX thread. |