From: Andrew John Hughes Date: Wed, 13 Mar 2013 21:21:27 +0000 (+0000) Subject: Use pthread_equal rather than != to compare thread IDs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cf7583edf22575d3590be71d69727c3125d6659d;p=gcc.git Use pthread_equal rather than != to compare thread IDs. 2013-03-12 Andrew John Hughes * include/posix-threads.h: (_Jv_MutexCheckMonitor(_Jv_Mutex_t)): Use pthread_equal rather than !=. From-SVN: r196639 --- 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 + + * include/posix-threads.h: + (_Jv_MutexCheckMonitor(_Jv_Mutex_t)): Use + pthread_equal rather than !=. + 2013-01-07 H.J. Lu * 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.