_pthread_mutex_isowned_np(): use a more reliable method; the current code

will work in simple cases, but may fail in more complicated ones.

Reviewed by:	davidxu
This commit is contained in:
Dag-Erling Smørgrav 2008-02-14 12:37:58 +00:00
parent 1b7089994c
commit 096ba44775
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176275

View File

@ -876,5 +876,5 @@ _pthread_mutex_isowned_np(pthread_mutex_t *mutex)
if (__predict_false(ret))
return (ret);
}
return ((*mutex)->m_lock.m_owner == TID(curthread));
return ((*mutex)->m_owner == curthread);
}