* mutex.c (__pthread_mutex_trylock): Only set mutex owner if we

really own it.
	Patch by Kevin B. Hendricks" <khendricks@ivey.uwo.ca>.
This commit is contained in:
Andreas Jaeger 2000-07-31 15:31:21 +00:00
parent 5e6d1c3fac
commit 91856709da
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2000-07-31 Andreas Jaeger <aj@suse.de>
* mutex.c (__pthread_mutex_trylock): Only set mutex owner if we
really own it.
Patch by Kevin B. Hendricks" <khendricks@ivey.uwo.ca>.
2000-04-09 Ulrich Drepper <drepper@redhat.com>
* signals.c (sigaction): Fix return value for the case SIG is one

View File

@ -50,7 +50,8 @@ int __pthread_mutex_trylock(pthread_mutex_t * mutex)
switch(mutex->__m_kind) {
case PTHREAD_MUTEX_FAST_NP:
retcode = __pthread_trylock(&mutex->__m_lock);
mutex->__m_owner = thread_self();
if (retcode == 0)
mutex->__m_owner = thread_self();
return retcode;
case PTHREAD_MUTEX_RECURSIVE_NP:
self = thread_self();