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 !=. From-SVN: r196639
This commit is contained in:
committed by
Andrew John Hughes
parent
decc676eb5
commit
cf7583edf2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user