summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-06-02 08:37:01 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-06-02 08:37:01 +0000
commit523fcb36a8a5383867b0184dbdd1e5c8ce9adf74 (patch)
tree4f5d464a4d77d2a98d3daf3ca5c5d71e3322f611 /lib/libthr
parent39160940408a51d8f78a001d9efe3f7aae8a97ab (diff)
downloadFreeBSD-src-523fcb36a8a5383867b0184dbdd1e5c8ce9adf74.zip
FreeBSD-src-523fcb36a8a5383867b0184dbdd1e5c8ce9adf74.tar.gz
Remove unused member field m_queue.
Diffstat (limited to 'lib/libthr')
-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 e79e014..5c47a73 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 0453864..3b8820c 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;
OpenPOWER on IntegriCloud