summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2004-05-20 11:55:04 +0000
committermtm <mtm@FreeBSD.org>2004-05-20 11:55:04 +0000
commit7823ad2b49a5d4c0f72e5830fd1f049c89edcea6 (patch)
treeb981a6b3049c24958f111e4a0fd0b9df53f33c7d /lib/libthr
parent971205bfeeb854c2ea75b5eaddad9c591f2b3666 (diff)
downloadFreeBSD-src-7823ad2b49a5d4c0f72e5830fd1f049c89edcea6.zip
FreeBSD-src-7823ad2b49a5d4c0f72e5830fd1f049c89edcea6.tar.gz
q§
Diffstat (limited to 'lib/libthr')
-rw-r--r--lib/libthr/thread/thr_mutex.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
index 94c6c25..8bf68c1 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -379,6 +379,9 @@ retry:
goto out;
}
+ if ((*mutex)->m_type == PTHREAD_MUTEX_RECURSIVE)
+ (*mutex)->m_data.m_count++;
+
/*
* The mutex is now owned by curthread.
*/
@@ -644,14 +647,9 @@ mutex_self_lock(pthread_mutex_t mutex, int noblock)
PANIC("Shouldn't resume here?\n");
break;
- case PTHREAD_MUTEX_RECURSIVE:
- /* Increment the lock count: */
- mutex->m_data.m_count++;
- break;
-
default:
- /* Trap invalid mutex types; */
- return (EINVAL);
+ /* Do Nothing */
+ break;
}
return (0);
}
OpenPOWER on IntegriCloud