summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2006-06-02 08:37:01 +0000
committerDavid Xu <davidxu@FreeBSD.org>2006-06-02 08:37:01 +0000
commitb971a73040da990bdffd97480f3b060e4513969d (patch)
tree4f5d464a4d77d2a98d3daf3ca5c5d71e3322f611 /lib
parent4421f50dbcd2f36b743aa399d2b97522e01adfa2 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libthr/thread/thr_mutex.c6
-rw-r--r--lib/libthr/thread/thr_private.h1
2 files changed, 1 insertions, 6 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
index e79e014024f7..5c47a73c5923 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -118,7 +118,6 @@ mutex_init(pthread_mutex_t *mutex,
_thr_umtx_init(&pmutex->m_lock);
pmutex->m_type = attr->m_type;
pmutex->m_protocol = attr->m_protocol;
- TAILQ_INIT(&pmutex->m_queue);
pmutex->m_owner = NULL;
pmutex->m_flags = attr->m_flags | MUTEX_FLAGS_INITED;
if (private)
@@ -187,7 +186,6 @@ int
_mutex_reinit(pthread_mutex_t *mutex)
{
_thr_umtx_init(&(*mutex)->m_lock);
- TAILQ_INIT(&(*mutex)->m_queue);
MUTEX_INIT_LINK(*mutex);
(*mutex)->m_owner = NULL;
(*mutex)->m_count = 0;
@@ -238,9 +236,7 @@ _pthread_mutex_destroy(pthread_mutex_t *mutex)
* in use. Mostly for prority mutex types, or there
* are condition variables referencing it.
*/
- if (((*mutex)->m_owner != NULL) ||
- (TAILQ_FIRST(&(*mutex)->m_queue) != NULL) ||
- ((*mutex)->m_refcount != 0)) {
+ if ((*mutex)->m_owner != NULL || (*mutex)->m_refcount != 0) {
THR_UMTX_UNLOCK(curthread, &(*mutex)->m_lock);
ret = EBUSY;
} else {
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index 0453864a9c8b..3b8820c91078 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -115,7 +115,6 @@ struct pthread_mutex {
volatile umtx_t m_lock;
enum pthread_mutextype m_type;
int m_protocol;
- TAILQ_HEAD(mutex_head, pthread) m_queue;
struct pthread *m_owner;
int m_flags;
int m_count;