]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use pthread_equal rather than != to compare thread IDs.
authorAndrew John Hughes <gnu.andrew@redhat.com>
Wed, 13 Mar 2013 21:21:27 +0000 (21:21 +0000)
committerAndrew John Hughes <gandalf@gcc.gnu.org>
Wed, 13 Mar 2013 21:21:27 +0000 (21:21 +0000)
2013-03-12  Andrew John Hughes  <gnu.andrew@redhat.com>

* include/posix-threads.h:
(_Jv_MutexCheckMonitor(_Jv_Mutex_t)): Use
pthread_equal rather than !=.

From-SVN: r196639

libjava/ChangeLog
libjava/include/posix-threads.h

index d5f508de4b72d6bc806d8e6109a2249bab4eb9fc..7ad315ed8b92894d3fca5e65f7be3533c5ee4fd7 100644 (file)
@@ -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
index 59e65f74499b61b0194cc85b3d4d3aa514468ff1..1ec311d7fa066b5fca20c8e17fb96f8389904466 100644 (file)
@@ -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.